How to use the Hreflang Tag Generator
- 1
Add each version of the page with its language (and optional region) code and URL.
- 2
Choose an x-default page for everyone else.
- 3
Add the same full set of tags to every version of the page.
What hreflang does
Hreflang tells Google which version of a page to show to which language or country, such as en-us for the United States and en-gb for the United Kingdom. It prevents the wrong version ranking and stops near-duplicate regional pages competing.
The rules that break most setups
Hreflang only works when it's complete and reciprocal:
- Every version lists every other version, including itself
- Use language codes (en) with optional region codes (en-us), not country alone
- Point every URL at a live, indexable, canonical page
- Add x-default for a language picker or global page
Frequently asked questions
Do I need hreflang for one language?
No, unless you have separate regional versions of the same language, such as US and UK English.
HTML tags or sitemap?
Either works. Sitemaps are easier to manage on large sites; HTML tags are simpler for a few pages.
What is x-default?
The version shown to visitors whose language or region doesn't match any listed version.
Is my data stored?
No. Tags are generated in your browser.

