hreflang validator.
The hreflang validator reads the language links in pasted markup and flags the six most common mistakes.
The check runs through the browser’s own parser: the pasted text is read as a document and the links carrying `rel="alternate"` are collected. Parsing markup with regular expressions is fragile — quote style, attribute order and whitespace all change the outcome.
Why these six
The underscore is the most common typo: because it is habitual in file names and programming languages, people write `tr_TR`, yet a language tag wants a hyphen. The second frequent mistake is format — taking a country code for a language, for instance. The third is a relative address: hreflang wants an absolute one, because a link may point to a different domain.
The remaining three concern the integrity of the set. Declaring the same tag twice leaves the engine uncertain. A missing self-reference makes the set one-way — Google ignores declarations that are not reciprocal. And no x-default means leaving no default for a visitor who matches nothing. The full list of mistakes is written separately.
Why the page is not fetched
The tool does not take an address and download the page, and that is a decision rather than a shortcoming. This site’s content security policy is closed to external requests; even if it were not, sending an address the user is auditing to a server would contradict the privacy statement. The input is pasted, the check runs in the browser, and no data leaves the page.
In practice the difference is small: viewing a page’s source and copying the head section takes a few seconds. In exchange, the check also works on pages that require a login or are not published yet.
What it does not validate
The tag format check is a practical gate, not the whole of BCP 47: the standard rests on a large registry of language, script and region subtags, and full validation requires that table. The tool catches the three most frequent mistakes; a tag it does not recognise is not always wrong. Reciprocity, too, cannot be verified from a single page — whether the target pages point back can only be seen by auditing them as well. The concept itself and the tag standard are described separately.
How to use
- Paste the page’s <head> section, or just the link elements
- Press Validate
- Findings come out as a numbered list — if it is clean, it says so too
The tool runs entirely in your browser — no data is sent, no cookies are written.