TechnicalSEO: highInside <head>

link rel="alternate" hreflang

Tells search engines which language/region a page targets and links to equivalent pages in other locales.

Hreflang annotations solve the international duplicate content problem — without them, Google may show the wrong language version to users in different countries. Each hreflang tag specifies one locale variant and must be reciprocated: if your English page points to a Spanish variant, the Spanish page must return-point to the English page.

The value is an ISO 639-1 language code (en, es, fr, de) optionally combined with an ISO 3166-1 country code (en-US, en-GB, fr-FR, pt-BR). Use "x-default" for the fallback page shown when no locale match exists. Hreflang can be implemented in <head>, in HTTP response headers, or in the XML sitemap.

Common errors: missing return annotations (breaks the entire hreflang set), incorrect language codes (zh-Hans vs zh-CN — use the correct regional code), pages blocked by robots.txt (Googlebot can't read the annotations), and non-canonical URLs in hreflang (the href must match the canonical URL of each page).

HTML Example

<link rel="alternate" hreflang="en-US" href="https://example.com/en/page/">
<link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/page/">
<link rel="alternate" hreflang="es" href="https://example.com/es/page/">
<link rel="alternate" hreflang="x-default" href="https://example.com/en/page/">

Attributes

relMust be "alternate".
hreflangISO 639-1 language code, optionally with ISO 3166-1 country (e.g., en-US). Use x-default for the fallback.
hrefAbsolute URL of the alternate locale page. Must match that page's canonical URL.
Check this tag on your site
Audit your link rel="alternate" hreflang implementation on any URL
Hreflang Generator

Related Tags

link rel="canonical"
Specifies the preferred URL for a page when duplicate or near-dup…
meta robots
Directives that control how search engines index the page and fol…
← All Meta Tags