Hreflang Validator

Hreflang only works when every variant points back at every other variant. This validator checks a set of annotations for the mistakes that cause Google to ignore the whole group.


How this tool works

An hreflang annotation tells a search engine that the same content exists in another language or in another market, and which version to show. It is the mechanism behind every multilingual site that ranks correctly, and it is also the mechanism most often implemented wrongly, because the rules are about reciprocity and about self-reference as much as about markup.This validator checks an annotation set against those rules: that every declared alternates is confirmed by the other version, that each version references itself, that the language and region codes are well formed and in the right order, and that x-default is present where it is needed. The most common failure is a return link that is missing, which makes the whole set invisible.

When to use it

Frequently asked questions

What is the most common hreflang error?

A missing return link. If page A declares page B but page B does not declare page A, the annotation set is ignored entirely.

Do hreflang tags need to be in the head?

They can be in the head, in a sitemap or in an HTTP header, and they must be found consistently. Mixing locations is a common cause of them being ignored.

What is x-default?

A catch-all alternate for a page, used where there is no single obviously correct language or region, typically on a language selector page.

Do I need hreflang if I use a subdirectory per language?

It helps. Hreflang tells a search engine that the versions are the same content, which is different from what the URL structure implies.

What is the difference between en and en-GB?

A language and a region. en-GB means English as spoken in the United Kingdom, and it is a more specific signal than en, which is any English.

Does hreflang affect ranking?

It does not change where a page ranks. It changes which version is shown to which user, which changes click-through rate and therefore traffic.

Related