Valid codes
| Correct | Wrong | Why |
|---|---|---|
| en-GB | en-UK | The UK’s ISO country code is GB |
| ja | jp | jp is a country, not a language |
| es-419 | es-LA | Latin America uses the UN code 419 |
| zh-Hans / zh-CN | cn | Language first, then script or region |
The rules that break most setups
- Return links: if page A lists B, B must list A, or Google ignores the pair.
- Self-reference: each page includes itself in the set.
- Canonical URLs only: hreflang URLs must be the canonical, indexable versions.
- Use one method per site (HTML, sitemap or headers) to keep it maintainable.
Related tools
Frequently asked questions
What is hreflang?
An annotation telling search engines which language or regional URL to show to which users.
Is the code language or country?
Language first (ISO 639-1), optionally followed by a region (ISO 3166-1), e.g. en-GB.
Can I use only a country?
No – a language is always required.
What is x-default?
The URL for users who match none of your listed languages.
Does every page need all tags?
Yes – each version lists all versions including itself.
HTML or sitemap?
Either works; sitemaps are easier for many pages, HTML for small sites.
When should I use HTTP headers?
For non-HTML files such as PDFs.
Does hreflang change rankings?
It helps the right version show in each market; it is not a ranking boost.
Does Bing support hreflang?
Bing relies more on the content-language meta tag and html lang attribute.
Is “en-UK” valid?
No – use en-GB.
Are codes case-sensitive?
No, but en-GB is the conventional form.
Can hreflang point to another domain?
Yes – versions can live on different domains or subdomains.
What if a version is noindex?
Remove it from the set; hreflang should list indexable pages only.
Do I need hreflang for one language?
No.
Why is Google ignoring my tags?
Usually missing return links, non-canonical URLs or invalid codes.
How do I add the sitemap namespace?
Add xmlns:xhtml="http://www.w3.org/1999/xhtml" to the <urlset> element.
Can I mix scripts like zh-Hant?
Yes – script subtags such as Hans and Hant are supported.
Is it free?
Yes – no sign-up, no limits and no watermark.
Does it work on a phone?
Yes, in current mobile browsers; the layout adapts to small screens.
Is my content sent anywhere?
No. The tool runs in your browser and nothing you type is uploaded.
Last reviewed: 8 November 2026.