What hreflang tells search engines
Hreflang annotations identify language or regional alternatives for pages that have substantially equivalent content. They help search engines understand which URL may suit a language and region. They are signals, not commands, and do not replace useful localized content, canonical URLs, or clear navigation.
HTML implementation
Each alternate page should list the complete set, including its own URL. Use absolute URLs and valid language tags:
<link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/page/">
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr-fr/page/">
<link rel="alternate" hreflang="x-default" href="https://example.com/language-selector/">
The English page and French page should both publish the same alternate set. Use x-default for a language selector or a fallback page when appropriate. It is optional.
XML sitemap implementation
<url>
<loc>https://example.com/en-gb/page/</loc>
<xhtml:link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/page/"/>
<xhtml:link rel="alternate" hreflang="fr-FR" href="https://example.com/fr-fr/page/"/>
</url>
When hreflang is included in an XML sitemap, each URL entry in the cluster should repeat all alternatives. Declare the XHTML namespace on the sitemap root.
Common errors
- One page omits a return annotation.
- Alternates point to redirects, errors, or non-canonical URLs.
- Language codes use an invalid or inconsistent format.
- Canonical tags point to another language version when each localized page should be canonical to itself.
- Alternates refer to pages that are not genuinely equivalent.
How to verify
- Fetch each page and confirm the tags are present in its HTML or sitemap.
- Confirm each URL is absolute, accessible, canonical, and indexable.
- Check every alternate page links back to the complete cluster.
- Use Search Console and other search-engine tools to monitor the pages after publication.
Use the hreflang Tags Tester to inspect a source and compare reciprocal links for supplied URLs. See the XML Sitemap Generator for sitemap annotations.