Make and check hreflang tags
If a page has versions in different languages or for different countries, hreflang tells Google which one to show each visitor. List the versions to get the tags for each page’s <head> or for your sitemap, with every code checked against Google’s rules, such as en-GB, never en-UK.
Versions of the page
One row per language or country version. Use x-default for the page everyone else should get.
Codes are a language (en, de, zh), optionally with a script (zh-Hans) and a country (en-GB, fr-CA). The UK is GB.
Tags
Use one method, not both. With HTML tags, add the same full set to every version, including a link to itself. Rules from Google’s guide to localised versions, checked 6 October 2026.
Runs in your browser. Nothing you type is sent anywhere.
How it works
- Enter each version’s language code (optionally with a script and a country) and its address.
- Codes are checked against the ISO standards Google uses, with the common mistakes explained: country codes on their own, UK instead of GB, numeric regions and old codes.
- You get the full set of tags to add to every version, or the sitemap entries that do the same job.
What you enter stays on your device
This tool runs entirely in your browser. Nothing you type is sent to our servers, so there is nothing for us to store, see or delete.
To check, open your browser’s developer tools, switch to the Network tab and use the tool: you will not see what you type being sent anywhere.
Related tools
Questions
Do I need to put the tags on every version?
Yes. Every version should list all the versions, itself included. If page A points to page B but B doesn’t point back, Google may ignore the tags.
What is x-default?
The page for visitors whose language or country doesn’t match any version, often your main version or a language chooser.
Is what I enter sent anywhere?
No. Everything runs in your browser and nothing you type is sent to our servers.