Guides · 2026-10-02 · By VSNARY | Emmanuel Orta · 1 view
Hreflang audit: return links, x-default and common errors
Hreflang tells a search engine which language or regional version of a page to show. It only counts when every version links back. The rules, the six errors that make Google ignore a set, and how to audit it from the outside.
Hreflang annotations tell Google which language or regional version of a page to show a searcher. Each version must list every version in the set, including itself, with an ISO 639-1 language code and optional ISO 3166-1 region code, and every link must be returned by the page it points to or Google ignores it. x-default names the fallback for unmatched users. Each URL must be the canonical, indexable version. Annotations can go in the HTML head, HTTP headers or the XML sitemap. Bing relies mainly on the content-language meta tag and the page's own language rather than hreflang.
A site that publishes the same page in several languages has to tell search engines which version belongs to which audience, or it risks the English page ranking in Germany and the German page competing with it. Hreflang is the mechanism Google uses for that. It is also one of the easiest annotations to get almost right, and almost right is ignored. This guide covers the rules, the errors that invalidate a set, and how to audit one.
The rules #
Every version of a page carries a link rel="alternate" element for every version in the set, including one pointing at itself, each with an hreflang value and an absolute URL. Values are an ISO 639-1 language code, optionally followed by an ISO 3166-1 alpha-2 region code: de, pt-BR, en-GB. The special value x-default names the page to show users whose language matches none of the others, often a language selector or the main version. Our own homepage carries this set in its head:
<link rel="alternate" hreflang="en" href="https://crawlcheck.io/">
<link rel="alternate" hreflang="de" href="https://crawlcheck.io/de/">
<link rel="alternate" hreflang="fr" href="https://crawlcheck.io/fr/">
<link rel="alternate" hreflang="es" href="https://crawlcheck.io/es/">
<link rel="alternate" hreflang="pt" href="https://crawlcheck.io/pt/">
<link rel="alternate" hreflang="x-default" href="https://crawlcheck.io/">Each of the four translated pages carries the identical six lines. Pages we have not translated, such as this guide, carry none, because an annotation must point at a page that exists and says the same thing in another language.
Return links are the rule that breaks most sets #
Google only trusts an hreflang link when the page it points to links back. If the English page lists the German page but the German page does not list the English one, the pair is ignored. That rule stops a third party from claiming to be your German version. It also means one template that forgets the annotations, or one page that was translated later, quietly breaks the pairs it belongs to. A set of five versions has ten pairs, and every one must be reciprocal.
The six common errors #
| Error | Effect | Fix |
|---|---|---|
| missing return link | that pair is ignored | emit the full set from one shared template |
| no self-reference | the set may be treated as incomplete | each page lists itself too |
invalid code (en-UK, jp, es-LA) | the annotation is ignored | use ISO 639-1 language and ISO 3166-1 region: en-GB, ja |
| URL is not canonical, redirects or is noindex | the annotation points at a page that cannot be shown | reference the final, indexable, self-canonical URL |
| canonical points to another language | Google keeps one version and drops the others | each language version is its own canonical |
| relative URLs | resolved inconsistently | always absolute, with protocol |
The canonical conflict deserves emphasis because it is common in CMS setups: a translation plugin sets every language's canonical to the English URL, which tells Google the translations are duplicates of the English page, and Google obliges. The interaction with canonicals generally is in the canonical URL audit.
Where to put the annotations #
Three places are equivalent for Google: link elements in the HTML head, a Link HTTP header (useful for PDFs), or xhtml:link entries inside the XML sitemap. Pick one. Using two invites them to disagree, and sitemap annotations are invisible to anyone reading the page. If the annotations are injected by JavaScript after load, many clients never see them; render them in the server HTML.
Other search engines #
Bing has said it uses hreflang only as a weak signal and relies mainly on the content-language meta tag or header and the language of the page text itself. Set lang on the html element of every version to match its content, which also helps screen readers and translation tools. Yandex supports hreflang. Answer engines generally read the page's own language and do not use hreflang to choose a version.
Language, region and when to use each #
Use a language code alone unless the content really differs by country. One Spanish page for every Spanish speaker is es; separate pages for Spain and Mexico with different prices, spelling or legal text are es-ES and es-MX. A region code cannot be used alone: hreflang="MX" is invalid, because the value always starts with a language. If you publish regional variants, also consider a language-only entry pointing at the most general version, so a Spanish speaker in a country you have no variant for still gets Spanish rather than the x-default.
Hreflang is a hint about which version to show, not a redirect and not a guarantee. Google can still show a different version if it judges it more relevant. Do not redirect visitors automatically by IP or browser language; search crawlers mostly fetch from one country and would only ever see one version. Offer a visible language switcher instead, with each link marked with its own hreflang and lang attributes, as ours is.
Large sets belong in the sitemap #
A page with twenty language versions needs twenty-one link elements in every head, which adds weight to every page and every template. At that size the sitemap form is easier to keep correct: each url entry lists its alternates as xhtml:link elements, generated from one table of translations, and the HTML stays clean. The same reciprocity rules apply inside the sitemap, and the sitemap must be one Google can read, which is covered in the sitemap audit guide. Whichever form you choose, generate it from data rather than writing it by hand, and audit it after every new translation, because each one adds a pair to every existing version.
Auditing a set from outside #
Fetch each version's server HTML, extract every hreflang link, and build the graph. For every link from A to B, confirm B returns 200 without redirecting, is not noindex, is its own canonical, and links back to A. Confirm every page lists itself, every code is valid, and there is exactly one x-default. Then check that the lang attribute on each page matches its hreflang. Our post on translating crawlcheck.io describes how we generate the set from a single list of languages so that a new page cannot ship with a partial one.
Every figure above came out of this scanner.
Point it at your own domain and see the same measurements, free.
The main product
Found this on your own site? We fix it for $749.
Scan free to see where you stand. The fix is one site, every finding implemented and re-measured, with a sealed before and after.
Questions this post answers
What does hreflang do?
It tells Google which language or regional version of a page to show a searcher, so the right version ranks in each market.
What is an hreflang return link?
The link back from the page an annotation points to. Google ignores an hreflang link unless the target page links back to the source.
Does each page need to reference itself in hreflang?
Yes. Each version lists every version in the set, including itself.
What is x-default in hreflang?
The version to show users whose language or region matches none of the listed versions, often the main version or a language selector.
Is en-UK a valid hreflang code?
No. The ISO 3166-1 code for the United Kingdom is GB, so the correct value is en-GB.
Does Bing use hreflang?
Bing treats it as a weak signal and relies mainly on the content-language meta tag or header and the language of the page text.
Related findings
Comments
Comments are read before they appear. Nothing is published automatically, and no account is needed.
Writing about this? Facts, live figures and marks — every number on that page is dated and traceable to a scan.