Hreflang Tag Generator
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?
Is en-UK correct?
Related guides
-
Should You Block AI Crawlers? A Plain Guide to robots.txt and AI Bots
Which AI crawlers visit websites, what the difference between training and search bots is, and how to allow or block each one with robots.txt.
-
On-Page SEO Checklist: 15 Things to Check Before You Hit Publish
A practical, no-jargon checklist for getting a single page right: titles, descriptions, headings, images, links, indexing and structured data.
-
Schema Markup for Beginners: What JSON-LD Does and Which Types to Use
A beginner-friendly explanation of structured data and JSON-LD, the schema types most sites need, and how to add and test them.