HTML link rel attributes

rel="alternate" hreflang

Signals language and regional variants of a page so Google serves the matching locale URL (such as en-GB vs. en-US or es-MX) instead of the wrong regional version.

Verified

Syntax / Example

<link rel="alternate" hreflang="en-us" href="https://example.com/us/pricing" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/pricing" />
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing" />

Verify On A Live URL

curl -sL https://example.com/ | grep -i "hreflang"

Documented Facts For rel="alternate" hreflang

Metric or RuleDocumented ValueSource
Code standards requiredISO 639-1 language + ISO 3166-1 Alpha-2 regionGoogle: Consolidate Duplicate URLs (Canonical)Checked November 25, 2026
Reciprocity requirementBidirectional return tags + self-reference mandatoryGoogle: Consolidate Duplicate URLs (Canonical)Checked November 25, 2026
Fallback tokenhreflang="x-default" for unmatched localesGoogle: Consolidate Duplicate URLs (Canonical)Checked November 25, 2026

Official Specification & Google Behavior

Google supports hreflang via HTML <link> tags, HTTP Link headers or XML sitemaps using ISO 639-1 language and optional ISO 3166-1 Alpha-2 region codes. Every localized pair must include reciprocal return links and a self-reference.

SEO & Indexing Impact

Prevents cross-country cannibalization and serves the right currency/language URL in SERPs. Missing return links or pointing hreflang at non-canonical/redirected URLs causes Google to ignore the annotation.

Backlink Monitoring Verdict
Hreflang does not merge PageRank like a canonical tag, but cross-region canonical mistakes (canonicalizing /uk/ to /us/) break localized indexing immediately.

Common Pitfalls

  • Using invalid country codes such as 'en-UK' instead of the valid ISO code 'en-GB'.
  • Adding a cross-locale rel='canonical' from /uk/ to /us/, which tells Google not to index the UK hreflang target.

Frequently Asked Questions

Why does Google ignore broken hreflang tags?
Google requires full reciprocity: if page A points hreflang to page B, page B must point back to page A, and both must self-reference and be indexable canonicals.
What does hreflang="x-default" do?
x-default designates the fallback URL or language-selector page shown to searchers whose language/region does not match any explicit hreflang entry.
Should localized pages canonicalize to one global page or to themselves?
Each localized hreflang URL must carry a self-referencing rel="canonical" tag, never a canonical pointing to another language version.

Primary Sources

Verified

Related Research Guides