Glossary

hreflang

An hreflang annotation tells search engines that several URLs are the same content in different languages or for different regions, so the right one is shown to the right audience. It does not affect ranking: it affects which version of an already-ranking page is served. Its defining rule is reciprocity — every page in a set must reference every other, including itself, and a set where one page fails to do so is discarded as a whole.

What it actually changes

Which version of a page is shown to a searcher, based on their language and region.

It does not make a page rank where it otherwise would not, and it does not divide or consolidate ranking signals.

So a page with no visibility gains nothing from adding annotations, which is the most common misplaced expectation about it.

Its value appears once several language versions exist and the wrong one is being shown, which is a specific and real problem.

It is independent of the canonical tag, and the two must agree: each language version is canonical for itself.

The reciprocity rule

If page A references page B as its French version, page B must reference page A as its English version.

Every page in the set must also reference itself, which is the requirement most often left out.

A missing return reference means the annotation is unconfirmed, and search engines discard the set rather than trusting half of it.

Which is why an annotation that looks correct on one page achieves nothing: correctness is a property of the whole set.

This makes hand-maintained annotations fragile at scale, since adding a language means editing every existing page.

The three mistakes that break a set

Wrong codes: a language code that does not exist, or a region code used where a language code belongs. Invalid values are ignored outright.

Relative URLs, which are not accepted — every reference must be absolute, including the scheme and the host.

Pointing at URLs that redirect, are blocked from crawling, or carry a canonical tag to somewhere else. A reference must resolve to an indexable page that references back.

A fourth, subtler one: declaring a version that does not really exist, which is what happens when a site advertises seven languages and has content in three.

Where to put them

In the HTML head, which is the most visible and easiest to verify by viewing source.

In HTTP headers, which is the only option for non-HTML files such as PDFs.

In the XML sitemap, which scales best because one file describes every set without editing any page.

Only one method should be used per set. Mixing them produces contradictions that are resolved unpredictably.

How it is observed

Annotations present in the served markup are read, and the language declaration of the page itself is checked separately.

A site advertising a translation that does not exist is the failure worth catching, because it sends searchers to a page that is not in the language promised.

Whether every reference is reciprocal requires fetching every referenced page, which is bounded by the crawl.

The canonical tag on each version is read alongside, since a canonical pointing at a different language version cancels the annotation entirely.

Frequently asked questions

Does hreflang improve rankings?
No. It decides which language version is shown to whom. A page with no visibility gains nothing from adding annotations.
Do I need a self-referencing annotation?
Yes, and it is the one most often omitted. Every page in a set references every page in the set, itself included.
Can I use it with a canonical tag?
Yes, and each language version must be canonical for itself. A canonical pointing at a different language version cancels the whole arrangement.

Sources

Related

VeriFixScan crawls a site and applies its checks to every page it reaches, keeping the evidence behind each finding. Scanning one website is free.

Scan a website