Hreflang Tags Complete Guide for Multilingual SEO
If your website serves users in more than one language or country, hreflang tags are not optional. They tell search engines which version of a page to show users in a specific language or region. Without them, Google may serve the wrong language to the wrong audience.
Use our Hreflang Tag Generator to create correct tags in seconds.
What Is Hreflang?
Hreflang is an HTML attribute that says: "This page has alternate versions in these languages." It prevents duplicate content issues across language variants.
Hreflang vs Canonical
Canonical says "this is the primary version" and consolidates signals. Hreflang says "these are alternate language versions" and routes users. These signals can conflict. Our Canonical + Hreflang Conflict Checker detects such issues.
Three Implementation Methods
HTML Link Tags
<link rel="alternate" hreflang="en" href="https://example.com/page" />
<link rel="alternate" hreflang="zh-CN" href="https://example.com/zh/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page" />
Generate with our Hreflang Tag Generator.
XML Sitemap
Better for large sites. Use our Hreflang Sitemap Generator.
HTTP Headers
For non-HTML files like PDFs.
Language Codes
Use language or language-region: en, en-US, zh-CN. ISO 639-1 for language, ISO 3166-1 Alpha 2 for region.
The x-default Value
For users whose language does not match any specific hreflang. Point it to a language selector or default homepage.
Common Mistakes
Missing return links: Every annotation must be reciprocated. Use our URL Mapping Checker.
Wrong language codes: zh instead of zh-CN, en-UK instead of en-GB.
Missing self-reference: Every page must include hreflang for itself.
Canonical conflicts: Check with our Canonical Hreflang Conflict Checker.
Testing
Check source code, use Google Search Console International Targeting, search in different Google country versions.
Key Takeaways
Get language codes right, always include x-default, ensure reciprocal links, test regularly. One broken hreflang can confuse search engines across your entire site.
Generate hreflang tags with our free Hreflang Tag Generator.