hreflang – Proper SEO for Multilingual & Regional Pages
The hreflang attribute is an HTML tag or HTTP header that tells search engines which language and regional version of a page to show to users based on their location and browser settings. It’s essential for international SEO and helps avoid duplicate content issues across country-specific versions.
Typical use cases:
- Multilingual websites (e.g. example.com/en/, example.com/de/)
- Country-specific variants with the same language (e.g. de-DE vs. de-AT)
- E-commerce platforms with regional currencies or shipping policies
- Proper indexation and serving of geo-targeted content
Example:
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Best Practices:
- Each variant must reference itself and all other language versions
- Use x-default for fallback pages when no match exists
- Can be implemented in the HTML <head>, as an HTTP header, or in the XML sitemap
- Use valid ISO language and region codes (e.g. en-US, fr-CH, de-AT)
Note: Misconfigured hreflang tags may lead to indexing conflicts. Google ignores invalid or contradictory hreflang declarations.