Hreflang tag generator
List the URL of each version of the page with its language code. The tool builds the same block for every version, as Google requires.
How to useVersions of your site in other languages
Hreflang tag generator: what it is for
Sites with versions in more than one language or for more than one country need hreflang annotations so Google shows each person the right version, such as en-US for the United States and en-GB for the United Kingdom.
List the code and URL of each version and the generator builds the complete block, which must go unchanged on every page (Google requires return links and each page referencing itself), with an optional x-default. It comes out as link tags for the head, in XML sitemap format with xhtml:link or as an HTTP Link header, and warns about invalid codes, such as UK instead of GB, incomplete URLs and duplicates.
How to use
- List the language code and URL of each version.
- Choose the x-default and the format.
- Paste the same block on every version.
When to use it
- Site with English and Spanish versions.
- Store selling in the US and the UK.
- Checking a hreflang that does not work.
Frequently asked questions
What is hreflang for?
It tells Google that the same page exists in other languages or for other countries, so it shows the right version: people searching in the UK see the en-GB page and people searching in the US see the en-US one. It does not change ranking, only which version appears.
Why do all versions need the same block?
Google only accepts the relationship if it goes both ways: the English page points to the Spanish one and the Spanish one points back. Each page also needs to list itself. That is why the same complete block goes on every version.
How is the code written?
Language in ISO 639-1 (en, es, pt) and, optionally, the region in ISO 3166-1 alpha-2 after a hyphen (en-US, en-GB, pt-BR). Region alone, like US, is not valid. x-default marks the page for people who do not match any of the others, such as a language picker.
Is it really free?
Yes, 100% free. No sign-up, no subscription and no usage limits. All Tools123 tools are free and run right in your browser.