Hreflang Tag Generator
Generate hreflang tags for multilingual and multi-regional sites, as HTML, HTTP headers or an XML sitemap.
List every language or country version of one page, including the page itself.
Hreflang Tag Generator
Hreflang tags tell Google which language or country version of a page to show each searcher, so a visitor in Mexico sees your Spanish page and not the US one. Every version must list all the others and itself, and the codes must be valid. This generator builds the complete, consistent set, with an x-default fallback, in any of the three supported formats.
How to use Hreflang Tag Generator
- Add a row for each version of the page: choose the language (and optionally the region) and enter its URL.
- Add an x-default row for everyone else, pointing at your international or language-picker page.
- Choose the output: HTML link tags, HTTP Link header or XML sitemap.
- Put the same set on every version of the page.
When it comes in handy
- Launching a site in a new language or country.
- Fixing "no return tags" errors in hreflang audits.
- Setting up hreflang for PDFs and non-HTML files through headers.
Frequently asked questions
- Language-only or language plus region?
- Use language only (es) when one Spanish page serves everyone. Add a region (es-MX, es-ES) only when you have different pages for different countries.
- Is en-UK correct?
- No. The country code for the United Kingdom is GB, so the tag is en-GB. The generator only offers valid codes.