Show every visitor the right language.
List each language and region version of a page and get correct, reciprocal hreflang tags for your HTML head or XML sitemap, with x-default and code checks.
Your language versions
Add every version of one page. Codes are a language (ISO 639-1), optionally with a region (ISO 3166-1), e.g. en, en-US, es-MX.
| Language-region code | URL |
|---|
HTML head tags
XML sitemap entries
How hreflang works
Hreflang tells Google which version of a page to show to which language or region, so Spanish speakers in Mexico get your es-MX page and US visitors get en-US. Every version must list every other version and itself, and the links must be reciprocal; if page A points to B but B doesn't point back, Google may ignore both. The x-default URL is the fallback for everyone else, often a language picker or your main site.
Use either the head tags or the sitemap entries, not both. Sitemaps are easier to maintain on larger sites. Build the rest of the sitemap with the free XML sitemap generator.
Frequently asked questions
What is an hreflang tag?
An HTML or sitemap annotation that tells search engines which language and regional version of a page to show to which users.
Do I need x-default?
It is recommended. x-default tells Google which page to show when no language or region matches, such as a language selector or your main site.
Does hreflang need to be reciprocal?
Yes. Every version must list all the others and itself. If links aren't returned, Google may ignore them.
Is this hreflang generator free?
Yes, with no signup. Everything runs in your browser; nothing you enter is sent anywhere.
Related reading
Want us to do this for you?
Get a free AI visibility report: how ChatGPT, Gemini and Google AI describe your business, and what to fix first.