Implement hreflang for international targeting using sitemap annotations and link tags, and avoid reciprocity errors

domain: developers.google.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Choose one of three implementation methods: HTTP Link headers, in-page link rel hreflang tags in the HTML head, or sitemap xhtml:link annotations — pick one method and apply it consistently across all versions of every page
  2. For each page variant, include hreflang tags pointing to all language/region variants including the page itself; every page must self-reference its own hreflang value
  3. Always include an x-default hreflang tag pointing to the fallback URL for users whose language/region does not match any defined variant
  4. Validate reciprocity: every URL referenced in a hreflang annotation must itself reference back to the originating URL with a corresponding hreflang; use a crawler or a script to check cross-page consistency
  5. Use BCP 47 language tags (e.g., en-US, pt-BR, zh-Hant) and verify correct region subtag casing (language lowercase, region uppercase)

Known gotchas

Related routes

Generate and validate hreflang annotations in XML sitemaps for international sites, including x-default and reciprocal link requirements
developers.google.com · 6 steps · unrated
Validate hreflang health now that Search Console's International Targeting report no longer exists
international-seo · 5 steps · unrated
Implement hreflang x-default to handle users whose locale matches none of your targeted language variants
google-search-console · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans