On a site with versions of its pages in several languages or for several countries, two tags do most of the work of telling search engines how the pages relate: hreflang and canonical. They are often confused, because both point from one page to others. They answer different questions, and using one where the other belongs is one of the most common reasons international versions are ignored.
This post explains what each tag says, how they fit together, and the one combination that cancels your hreflang out.
What each tag says
Hreflang says: this page has equivalents in other languages or for other regions, and here they are. Google’s documentation describes it as the way to tell Google about the localized variations of your content, so it can show searchers the version in their language or for their region.
Canonical says: of the addresses that show this same content, this one is the main version. It is about duplicates, such as the same page with and without tracking parameters, not about translations.
| Hreflang | Canonical | |
|---|---|---|
| Question it answers | Which version suits which language or region? | Which address is the main one for this content? |
| Points to | Every language or regional version, including itself | One preferred address |
| Used for | Translations and regional variants | Duplicates of the same page |
| Needs return links | Yes | No |
Translations are not duplicates
The key to using both correctly is that a translated page is not a duplicate of the original. Google’s documentation states that localized versions of a page are only considered duplicates if the main content remains untranslated. A French page and an English page with the same meaning are two different pages, each of which deserves to be indexed and shown to the right audience.
That is why the canonical tag should never point from one language version to another. If the French page declares the English page as its canonical, it is telling search engines that it is a copy to be folded into the English one, and the French version may disappear from results along with its hreflang annotation.
The pattern that works
On each language version:
- The canonical points to itself: the preferred address of that same language version.
- The hreflang annotations list every version, including itself, with the right language and region code for each.
- Every other version does the same, so each page links to all the others and they link back.
For a page in English and French:
On https://www.example.com/en/services/:
<link rel="canonical" href="https://www.example.com/en/services/">
<link rel="alternate" hreflang="en" href="https://www.example.com/en/services/">
<link rel="alternate" hreflang="fr" href="https://www.example.com/fr/services/">
On https://www.example.com/fr/services/:
<link rel="canonical" href="https://www.example.com/fr/services/">
<link rel="alternate" hreflang="en" href="https://www.example.com/en/services/">
<link rel="alternate" hreflang="fr" href="https://www.example.com/fr/services/">
The hreflang tag generator builds the full set of annotations from a list of versions, checks the language and region codes and the addresses, and gives you one set to put on every version. The meta tag generator writes the canonical tag.
Return links are required
Google’s documentation is strict about one thing: each language version must list itself and all the other versions, and if two pages do not both point to each other, the tags will be ignored. A French page that lists the English page, without the English page listing it back, gets no benefit at all. This is the most frequent reason hreflang appears to do nothing, and the generator produces the same set for every version precisely to avoid it.
Where duplicates and translations meet
Real sites have both problems at once. The French services page might also be reachable with a tracking parameter, or with and without a trailing slash. The rule still holds: each duplicate points its canonical at the preferred address of its own language version, and the hreflang annotations use only those preferred addresses. Never list a parameter version or a redirecting address in hreflang; use the canonical one.
Regional versions in the same language
Pages for the same language in different countries, such as English for the UK and English for the United States, are a special case. If the content differs, prices, spelling, delivery details, they are distinct versions and each should have a self-referencing canonical and hreflang codes with the region, such as en-GB and en-US. If the content is truly identical, the versions are duplicates in the ordinary sense, and it may be simpler to keep one page for both.
The codes themselves follow standards: the language in ISO 639-1 format, optionally followed by the region in ISO 3166-1 alpha-2 format. Common hreflang mistakes covers wrong codes and the other errors that make annotations invalid.
x-default for everyone else
Google’s documentation recommends considering a fallback page for unmatched languages, marked with the reserved x-default value. It is used when no other version matches the searcher’s language setting. A language selector page or the main international version are common choices. The x-default page also needs its own self-referencing canonical.
Three places to put hreflang
Hreflang annotations can go in the page’s HTML head, in HTTP headers or in the sitemap. Google’s documentation states that the three methods are equivalent from its perspective. The sitemap method is often easiest for large sites, because the annotations live in one file rather than on every page; the XML sitemap generator builds the base file. Whichever method you use, use one consistently, and keep the canonical tags on the pages themselves.
Hreflang does not set the language
Google states that it does not use hreflang or the HTML lang attribute to detect the language of a page; it works the language out from the content. Hreflang only connects versions. A page whose content is mostly English will be treated as English, whatever its annotations say, so the content itself has to be properly translated.
Language switchers and redirects
Some sites redirect visitors automatically to a language version based on their browser or location. That can stop crawlers, which usually visit from one location with one language setting, from ever reaching the other versions. Linking the versions to each other with a visible language switcher, and letting visitors choose, is safer than forcing a redirect. If you do suggest a version automatically, use a banner the visitor can dismiss rather than a redirect.
Checking the setup
Once hreflang and canonical tags are in place, view the source of each language version and check both. Every version should show a canonical pointing to itself and the same set of hreflang lines. Search Console reports problems it finds with international targeting, and its URL inspection shows which page Google has chosen as canonical. If Google has chosen a different language version as the canonical, the content may not be translated enough to count as a separate page, or the tags may be pointing the wrong way.
When the versions are not equivalent
Hreflang links pages that are equivalent: the same purpose, in another language or for another region. It should not link pages that are only loosely related, such as an English article and a different French article on a similar subject. If a page has no real equivalent in another language, leave it out of the hreflang set rather than pointing to the nearest page. Partial sets are fine; each page lists only the versions that genuinely exist.
Machine translation
Translated pages only count as separate versions if the main content is translated. Pages where only the menu and footer change, with the body left in the original language, are treated as duplicates. Pages translated automatically and published without review can also read poorly to the people they are meant for. Translate the content properly, and review it, before adding a language version to the set.
Keeping the set in step
The hardest part of hreflang is maintenance. When a page is added, removed or moved in one language, every other version’s annotations must change too, or the set breaks: some pages point to addresses that no longer exist, or no longer point back. Keep the list of versions in one place, such as a spreadsheet or the sitemap, and regenerate the annotations from it whenever anything changes, rather than editing pages one by one.
A quick check for any page
- The canonical points to this page’s own preferred address, not another language.
- The hreflang set lists every version, including this one.
- Every listed version lists this one back.
- All addresses in both tags are absolute and final, with no redirects.
- An x-default exists if you have visitors whose language you do not serve.
Sources, read November 14, 2026:
- Google Search Central, Tell Google about localized versions of your page: hreflang for localized variations, localized pages as duplicates only when the main content is untranslated, each version listing itself and all others, ignored tags without return links, x-default, the three equivalent methods, ISO 639-1 and ISO 3166-1 alpha-2 codes, and Google not using hreflang or lang to detect language.