It is en-GB, not en-UK
This is the most common hreflang mistake, and it reads as correct because uk is a real code — it is the ISO 639-1 language code for Ukrainian. It is not a country code. The United Kingdom is GB in ISO 3166-1, so the value is en-GB.
An en-UK annotation is not partially understood; it is invalid, and the whole annotation is disregarded. This tool reports it as an error and names the correction, in exactly those terms.
How to use it
- Put one alternate per line: the hreflang value, a space or a comma, then the absolute URL. Lines starting with
#are comments. - You can also paste existing
<link rel="alternate">tags or HTTPLinkheaders instead — the format is detected per line, so one paste may mix all three. - Fill in Page URL to check that the set includes the page itself, which is required and easy to forget.
- Press Run or Ctrl/Cmd + Enter. Switch to Generate for the tags.
What a value may contain
A value is a two-letter language code, optionally followed by a four-letter script code and then a two-letter country code — or the literal x-default.
de— language only.en-US— language and country.zh-Hant— language and script.Hantis Traditional Han: a script, not a place.zh-Hans-US— all three, in that order.
Because a script code is four letters and a country code is two, the parse never has to guess which is which. zh-US-Hans is the same three subtags in the wrong order, and the tool says so and prints the corrected value rather than just calling it malformed.
Three-letter language codes are the other frequent mistake: eng, zho, jpn are ISO 639-2, and hreflang uses the two-letter ISO 639-1 form. The message names the right code.
Values are matched case-insensitively, so EN-gb works — but the output is always written canonically as en-GB, and the tool tells you when it changed the spelling instead of correcting you silently.
What this tool checks, and what it cannot
It checks the annotation set you gave it. Value grammar against ISO 639-1, ISO 15924 and ISO 3166-1 alpha-2; absolute URLs with a safe scheme; the same value pointing at two different pages; one page claimed by two languages; duplicate x-default; and whether the page lists itself.
It cannot check return links, and it says so on every report. Confirming that each alternate carries a matching annotation back means fetching those pages, and this tool never makes a network request. A set that is clean here can still be ignored if the return links are missing, if the pages are not indexable, or if the URLs redirect. That statement is part of the report and is not dismissable, because a screenshot of a green result must not read as a broader claim than the tool can support.
Why the generator refuses to write your tags
If the set contains an error, Generate produces no tags at all and shows you the findings instead. That is deliberate. A generator that cheerfully writes hreflang="en-UK" into a tag is a defect factory: the output looks authoritative, gets pasted into a template, and reproduces the mistake across every page on the site.
Warnings do not stop generation — a fragment in a URL is worth knowing about but is your call. Errors do.
Absolute URLs, and the ones that are refused outright
hreflang URLs must be absolute, with the scheme written out. A relative URL such as /en-gb/ does not work, and neither does a protocol-relative //example.com/en-gb/ — both are errors here rather than quietly resolved against something this tool would have to invent.
Only http and https are accepted. javascript:, data: and file: URLs are refused with the scheme named. A URL carrying credentials is refused too, and the password is hidden in every echo of that URL in the report — not just in one row.
Frequently asked questions
What is x-default for?
It names the page to use when a visitor's language and region match none of your alternates — typically a language selector or your primary market's page. It is optional, and a set is valid without one. There can be at most one.
Does every page need to link to itself?
Yes. Each page in a set lists the whole set including itself, and every page must carry the same complete set. Fill in Page URL and this tool checks the self-reference for you.
Tags, headers or sitemap — which should I use?
Any one of them, but only one. <link> tags in <head> are the usual choice for HTML pages; Link headers are for non-HTML files such as PDFs; the sitemap form keeps the annotation out of your templates entirely. The generator emits whichever you choose, from the same validated set.
Is anything uploaded?
No. Validation runs on your device, and no URL in your input is ever fetched. Pasted markup is read by a tokenizer that never builds page elements, so an <img> or <iframe> that comes along with your tags is just text — there is nothing for a browser to load.