Skip to main content
← All articles
SEOPublished October 3, 20262 min read

Hreflang for a Bilingual Website (English and Indonesian)

How to mark English and Indonesian pages with hreflang so Google does not treat them as duplicates, including canonical and x-default rules.

hreflangi18nSEOBilingual
On this page

A site with / in English and /id/ in Indonesian is not automatically understood as two languages. Without hreflang, Google may pick the wrong URL for a searcher in Jakarta—or treat the pair as near-duplicates.

The minimum correct set

Each language URL should point to itself and to the other language, plus an x-default.

On https://example.com/about/:

<link rel="alternate" hreflang="en" href="https://example.com/about/" />
<link rel="alternate" hreflang="id" href="https://example.com/id/about/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/about/" />

On the Indonesian page, repeat the same three URLs. Hreflang is a cluster, not a one-way link.

Canonical stays on the same language

The English page canonical is the English URL. The Indonesian page canonical is the Indonesian URL. Do not canonicalize /id/about/ back to /about/ or you erase the language version.

Pages that exist in only one language

If a post is Indonesian-only, do not invent an English hreflang. Self-reference that URL (or omit alternates) and keep it out of the other language’s sitemap if it has no translation.

Return links must be symmetric. A tag on page A that points to page B is ignored when B does not point back.

Sitemap alternative

You can declare the same relationships in the XML sitemap instead of the HTML head. Pick one method and keep it generated from the same route map so a renamed slug cannot drift.

What I check after deploy

  1. View source on a paired URL and confirm absolute https hrefs.
  2. Open both language homepages and one inner page.
  3. Look in Search Console later for international targeting / hreflang errors (return tag missing, noindex conflict).
WhatsApp