Hreflang Tag Generator
NewBuild a set of <link rel="alternate" hreflang> tags for international/multilingual SEO from a list of language codes and URLs, with validation for common mistakes.
Frequently Asked Questions
What format should the language codes use?
ISO 639-1 language codes (like "en" or "es"), optionally combined with an ISO 3166-1 region code (like "en-US" or "es-419" for Latin America) — the tool validates entries against this pattern and flags anything that doesn't look right.
What is x-default for, and should I always include it?
x-default tells search engines which URL to show when none of your other hreflang entries match a visitor's language/region — it's commonly used to point to a language-selector page or your default/primary-market version, and is recommended (though not strictly required) for most multilingual sites.
Why does the tool warn about duplicate language codes?
Search engines require each hreflang value to map to exactly one URL — if the same language code appears twice pointing to different URLs, the signal becomes ambiguous and may be ignored entirely.
Do these tags need to be reciprocal across all language versions?
Yes, in practice — Google's guidance is that hreflang annotations should be reciprocal, meaning each language version's page should link to all the others (including itself), so you'd typically place the full generated set on every one of your language variant pages, not just one.
Can these go in the HTML <head>, or only in a sitemap?
Both are valid per the specification — this tool generates the <link> tag format for placement directly in each page's <head>, but the same hreflang/URL pairs can also be expressed as <xhtml:link> entries inside an XML sitemap instead.