Why is en-UK wrong?
Because the region part comes from ISO 3166-1, and in that standard the United Kingdom is GB. UK is what people say and it is not a valid code, so a tag written that way is well formed and ignored.
The tags that tell a search engine which country version of a page to show, and the code mistakes that quietly stop them working.
List your language versions and their URLs. The tags come out in three formats, with the invalid codes named rather than passed through.
Everything here is worked out in your browser. Nothing you type is sent anywhere, and there is no account to make.
The page a visitor gets when no version matches their language. Usually your main market.
Language versions
Result
Fill in the fields on the left. Nothing is generated until you do, and nothing is filled in on your behalf.
What comes out
How to use it
One row per language or language and region, with the full URL of that version. Two rows is the minimum, because a set of one is not a set.
The page a visitor gets when no version matches their language. Usually your main market, and leaving it out is a missed instruction rather than an error.
Not a different block per page. The identical block, including the tag that points at the page itself, on all of them.
Hreflang says that several URLs are the same page in different languages or for different countries, and which visitor each one is for. Without it, a search engine sees near duplicate pages and picks one, which is how a British customer lands on the American store.
The mechanism is confirmation. Each page in the set names every other page, including itself, and the references have to run both ways. If page A names B and B does not name A, the annotation can be dropped entirely rather than in half.
That is why the block is identical across the set, and why the self reference is not optional padding.
Hreflang fails silently. There is no error and no warning: the tags sit in the head looking correct and the search engine ignores them. Most of the time the cause is a code that is the right shape and the wrong value.
The one people hit first is en-UK. United Kingdom is what everybody writes, and the country code is GB. The tag is well formed, so nothing complains, and the annotation does nothing. The same goes for a language code that is really a country one.
This tool checks the codes against the standards themselves rather than against a shape: languages from ISO 639-1, regions from ISO 3166-1. An invalid code is named, not passed through.
The tool
Two letter language from ISO 639-1, two letter region from ISO 3166-1. This is why en-UK fails here and en-GB does not.
Every block includes a tag pointing at its own page. A set where one page is missing that tag counts as unconfirmed and can be ignored in full.
Scheme and domain to lower case, tracking parameters dropped, trailing slash settled one way. Two spellings of a page look like two pages to a crawler.
Two rows with the same language code are flagged. Picking one quietly would hide which version was dropped.
That is legitimate: one page can serve two locales. It is flagged for a look, not removed.
Head tags, sitemap entries and an HTTP header, built from the same list rather than typed out three times.
Reading the result
We look at your search visibility across Google and the answer engines, and tell you what is costing you orders. No charge for the first look.
In practice
Generate the set before either version goes live, so the two pages never compete with each other for the same customer.
If the right page exists and the wrong one ranks, the codes are the first place to look, and en-UK is the first code to look at.
Regenerate the set from the new URLs. Half updated hreflang is worse than none, because it confirms a set that no longer exists.
One page serving several locales is normal. Give it the codes it serves and check the flag the tool raises.
Questions
Because the region part comes from ISO 3166-1, and in that standard the United Kingdom is GB. UK is what people say and it is not a valid code, so a tag written that way is well formed and ignored.
It is not required, and it is close to free. Without it, a visitor whose language matches nothing in your set gets whichever page the engine decides on.
Yes. A page missing its own reference leaves the set unconfirmed, and an unconfirmed set can be dropped in full rather than in part.
Yes, when one page legitimately serves two locales. The tool flags it so you can check it was deliberate, and leaves it in place.
Head tags for most sites. The sitemap version suits a large site where editing every template is the harder job. The header exists for files with no head, such as a PDF.
No. The tags are built in your browser and nothing typed here is uploaded.
The rest of the set
hreflang tells a search engine which version of a page belongs to which language and country. It creates no demand in that market. It stops the wrong page from being the one that shows up.
Where this comes up