Reference guide · technical-seo · Published 2026-08-16 · 4 min read
Hreflang basics for multilingual sites
Hreflang basics: how to mark language and region variants, the self-return and reciprocity rules, x-default, and the three implementation methods.
- ·When you need hreflang
- ·The cluster rules
- ·Which method to use
When you need hreflang
Hreflang (rel="alternate" hreflang=) tells Google which URL is the right one for a user in a given language and/or region. It is only useful when the same content exists in multiple languages or regional variants: en-GB and en-US, or en, fr, de. If your site is single-language, you do not need hreflang at all; the canonicalization rules cover a single-language duplicate.
A common constraint worth knowing before you start: hreflang assumes the variants are separate URLs (with distinct destinations), not the same page served with a language toggle cookie. If every variant renders under one URL and the crawler cannot tell the difference, hreflang cannot help; the URL structure is the prerequisite, see the subdomain vs subfolder decision first.
The two hard rules
Every variant must satisfy both, or Google ignores the *entire cluster*:
- Self-reference. Every page in the cluster lists itself in its
hreflangset. Page A<link hreflang="en-GB" href="/en/...">must also list/en/...withhrefpointing at itself. - Reciprocity. If page A lists page B as the
fralternate, page B must list page A as theen-GBalternate. A missing backlink drops the pair.
And the optional-but-recommended third rule: x-default. A fallback page for users whose language/region matches none of your declared variants. It typically points at the English homepage or a language selector page. Missing x-default does not break the cluster (Google uses its own detection), but Google explicitly recommends it for multilingual sites, and it is the most commonly missing element.
Codes and the region problem
Use xx-YY where xx is ISO 639-1 language and YY is optional ISO 3166-1 alpha-2 region. So en-GB, not en-UK. Simplest correct example on a page at https://example.com/gb/flagship/:
<link rel="alternate" hreflang="en-GB" href="https://example.com/gb/flagship/" />
<link rel="alternate" hreflang="en-US" href="https://example.com/us/flagship/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/flagship/" />
Note that x-default does not mean English; it means "show this fallback when nothing else matched". The final tag must be absolute URLs; relative hrefs and JS-only redirect pages both fail validation.
The three implementation methods
- HTML
<head>link tags. Simple per-page, but becomes unmaintainable past a handful of variants, and it must be the *rendered* head, not a view-source artifact (a JS-injected head without server-side inclusion is invisible to Googlebot). - HTTP
Linkheaders (theLink: <url>; rel="alternate"; hreflang="..."response headers). Useful for non-HTML files (PDFs). - XML sitemap alternate entries. The scalable method for many variants; every
<url>lists<xhtml:link rel="alternate" .../>entries. This is the one to choose at 3+ locales or 10k+ pages.
Pick exactly one method. Mixing the sitemap and the <head> risks conflicting signals, which is exactly the failure mode described in canonical and hreflang consistency.
Validate and maintain
After any change, validate the rendered head (not the source), and check that:
- Every URL in the cluster returns HTTP 200 and lists the full reciprocal set.
- The canonical and the hreflang point to the same locale family (a canonical to a different variant suppresses the cluster).
- No relative or fragment-only URLs are present.
Search Console's International Targeting report lists hreflang errors (missing reciprocity, invalid codes). The indexing analysis workflow adds it to the review. Check it weekly, because multilingual touchups break clusters more often than on-page edits.
Prevention
Define the cluster once in the CMS or build (single source of truth), generate from the locale map (never by hand per page), and test the URL for both hreflang and x-default consistency before deploy. A site that changes URL structure needs a redirect map for every locale variant too; the redirect map article covers that half of the job.