hreflang is a link relationship that signals the language, and optionally the region, that a page is intended for — for example en-US, da-DK, or just de. It can be declared in the HTML <head>, in HTTP headers, or inside an XML sitemap.xml. Search engines use these annotations alongside the Canonical Tag to pick the right version for each user.
Why it matters
Correct hreflang reduces duplicate-content confusion across translated and regional pages, so Google can serve a UK visitor your en-GB page instead of en-US. Wrong or missing annotations cause the wrong language to rank, hurt local relevance, and waste crawl budget on near-duplicates. For multinational sites, this is one of the highest-impact technical SEO fixes.
How to use
- Use absolute URLs in every annotation; relative paths break in syndicated contexts.
- Include a self-referential
hreflangon each page so the cluster is bidirectional — every language version must link back to every other. - Add an
x-defaultfor language selectors or fallback pages aimed at unmatched users. - Use ISO 639-1 language codes and optional ISO 3166-1 alpha-2 region codes (
fr-CA, notfr-fra). - Pair
hreflangwith consistent canonicals — a page should canonicalise to itself, not to a different language version. - Validate with Google Search Console's International Targeting report or by inspecting the rendered HTML.