Hreflang Tag Generator
Generate hreflang tags for multilingual sites — correct pairs, no typos.
How to use Hreflang Tag Generator
- Enter language | URL pairs, one per line — every version of the page, including the original.
- Add an x-default line pointing to your primary version as the fallback.
- Copy the generated tags into the <head> of every version of the page — the identical block on each.
- Verify reciprocity after deploying: Search Console's International Targeting report flags missing return tags.
What is Hreflang Tag Generator?
An hreflang generator builds the <link rel="alternate" hreflang="…"> tags that tell Google which language versions of a page exist and who should see which: a French searcher gets /fr/, a German searcher /de/, instead of everyone landing on English.
Each tag pairs a language code with that version's URL: <link rel="alternate" hreflang="es" href="https://example.com/es/" />. Codes are ISO language (es), optionally with a region (es-MX for Mexican Spanish), plus the special x-default for the fallback version. The syntax is finicky — wrong codes (the classic: "uk" is Ukrainian, not United Kingdom — Britain is "gb") and mismatched URLs silently void the whole setup — which is why generating beats typing.
About the Hreflang Tag Generator
Enter your language-and-URL pairs, one per line (like es | https://example.com/es/), and copy the generated tag block for your pages' <head>.
The two rules that make hreflang work: every version lists ALL versions including itself — the self-referencing entry is required; and tags must be reciprocal — if the English page points to the Spanish, the Spanish must point back, or Google ignores the pair ("return tag" errors in Search Console are exactly this). Add an x-default entry pointing at your primary version to catch searchers whose language you don't serve.
The same annotations can live in your XML sitemap instead of page heads (better for large sites — one file to maintain). Either location works; don't mix conflicting sets. Combined with translated content and self-referencing canonicals per version, this is the complete recipe for multilingual SEO.