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/">