Hreflang Tag Generator
Generate self-referential hreflang tags for multilingual sites. Includes x-default fallback. Google-compliant, copy-paste ready.
Language → URL pairs
Fallback URL for users whose language/region doesn't match any of your hreflang entries.
Generated HTML
<link rel="alternate" hreflang="en-US" href="https://example.com/" /> <link rel="alternate" hreflang="zh-CN" href="https://example.com/zh-cn/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />
✓ Self-referential: each page references itself with its own hreflang
✓ x-default: fallback for unmatched locales (recommended by Google)
✓ Bi-directional: all pages must link to each other
How to use hreflang tags
- Add the generated
<link>tags to the<head>of every language version of the page - Each page must reference itself AND all other language versions (self-referential + bi-directional)
- Use ISO 639-1 language codes (en, zh, fr) optionally with ISO 3166-1 Alpha 2 region codes (en-US, zh-CN, fr-CA)
- Include x-default for users whose language doesn't match any of your pages
- Verify in Google Search Console → International Targeting report