Also known as: hreflang tag, rel=alternate hreflang, language annotation
Hreflang (the HTML attribute rel="alternate" hreflang="…") tells search engines about the language and regional variants of a website. Where a website exists in several languages or for several countries, it ensures that Google serves the appropriate variant in each region and language — rather than accidentally showing the US English version to a German user. Hreflang is one of the most powerful and, at the same time, most error-prone SEO tools.
Hreflang uses ISO 639-1 (language, 2 letters) and optionally ISO 3166-1 (region, 2 letters). Examples: hreflang="de" (German, any region), hreflang="de-AT" (German for Austria), hreflang="en-US" (English for the USA). The special value hreflang="x-default" marks the fallback version for cases where no other variant fits — usually the main English page.
<link rel="alternate" hreflang="de-AT" href="…"> for each variant. Always works, but increases HTML size when there are many languages.<xhtml:link rel="alternate" hreflang="…"> in the sitemap. The cleanest solution for large websites with many languages.Six classics: (1) Missing return link — page A points to page B, but page B does not point back to A. Google then ignores the annotation. (2) Incorrect language codes — for example ”at” instead of ”de-AT” (Austria exists as a region, not as a language). (3) Conflict with the canonical — the canonical points to a different variant than hreflang does. (4) 404s on target pages. (5) Forgotten x-default variant on an international website. (6) Hreflang in the body instead of the head — this is ignored.
Example: A Swiss travel provider has German, French and Italian language versions. Without hreflang, Google sometimes serves the German variant in searches from Geneva — French-speaking users bounce without reading. With correct hreflang annotation in the sitemap (hreflang="de-CH", hreflang="fr-CH", hreflang="it-CH", hreflang="x-default"), Google shows the right language version in each region — the bounce rate for the French variant falls from 71 % to 42 % after 6 weeks.
<link rel="alternate" hreflang="de-DE" href="...">) tells Google which URL version of a page is intended for which language and region. For example: rankmio.de for German-speaking DACH users, rankmio.com for English-speaking users. Without hreflang, you risk the wrong language version being indexed in the local Google.<link>, (2) in the HTTP header (for non-HTML files), (3) in the XML sitemap. The XML sitemap variant is the most robust — it can be managed centrally and is less error-prone.Hreflang check in the technical SEO audit
Free SEO & GEO Check
SEO score, AI visibility and citability of your website in 30 seconds — no registration required.
Register for free, get 10 credits and start right away.
Register now