Free SEO Tool · Hreflang · International SEO · Multilingual
Hreflang Tag Generator
Generate hreflang tags for multilingual websites. HTML or XML sitemap format, x-default support, unlimited languages. Copy or download. Free.
One row per language version.
How to Use the Hreflang Tag Generator
Add one row per language version with the language code and full URL. Furthermore, set the x-default URL as the fallback for unlisted languages. Additionally, choose HTML link tags or XML sitemap format depending on your implementation preference.
- Add language/region pairsEnter ISO 639-1 codes (en, fr, de) with optional ISO 3166-1 region (en-US, en-GB, pt-BR). Furthermore, URL is the full canonical URL. Additionally, each row is one language version.
- Set x-defaultThe fallback for unlisted languages — typically the English or international version. Furthermore, recommended but not required. Additionally, Google uses it as the default when no language match is found.
- Choose HTML or XML formatHTML goes in the page head section. Furthermore, XML goes inside sitemap.xml. Additionally, both methods are equally valid.
- Copy all tagsPaste on every language version of the page. Furthermore, every version must reference all others including itself. Additionally, this reciprocal requirement is the most common error.
- ValidateCheck Search Console International Targeting. Furthermore, allow 2–4 weeks for processing. Additionally, use Screaming Frog for bulk hreflang validation.
What Are Hreflang Tags?
Hreflang tags tell search engines which language versions of a page exist. Furthermore, Google uses them to serve the correct version based on user location and language. Additionally, without hreflang, Google may show the wrong language in search results.
Common Hreflang Errors
| Error | Fix |
|---|---|
| Missing reciprocal links | Each page must reference all versions including itself |
| Invalid language code | Use ISO 639-1: en not eng, fr not fra |
| Non-canonical URL | Hreflang href must match canonical URL |
| Missing x-default | Add fallback to international version |
Language vs Region Targeting
Language-only codes (en, fr) target global speakers. Furthermore, language-region codes (en-US, en-GB) target specific countries. Additionally, use language-only when content is identical across regions.
Reciprocal Linking Requirement
Every page in a hreflang set must reference all others — including itself. Furthermore, one-way links are ignored by Google. Additionally, this is the number one implementation failure cause.
HTML vs XML Sitemap Implementation
HTML link tags go in the head section. Furthermore, XML uses xhtml:link inside each URL entry. Additionally, HTTP headers are a third option for non-HTML documents like PDFs.
Hreflang and Canonical Tags
The hreflang URL must match the canonical URL exactly. Furthermore, conflicting signals cause both to be ignored. Additionally, each language version's canonical must self-reference, not point to the default language.
ISO Language Code Reference
| Language | Code | With region |
|---|---|---|
| English | en | en-US, en-GB, en-AU |
| French | fr | fr-FR, fr-CA |
| German | de | de-DE, de-AT |
| Spanish | es | es-ES, es-MX |
| Portuguese | pt | pt-BR, pt-PT |
| Chinese | zh | zh-Hans, zh-Hant |
| Arabic | ar | ar-AE, ar-SA |
| Japanese | ja | ja-JP |