If you run a site in several languages, hreflang usually breaks in the links between versions. I checked 38 multilingual sites from the Tranco list, 10 to 30 pages on each. On 10 of them the language versions were missing return links, and on others the canonical pointed to a page in another language or an alternate URL ended in a redirect. A wrong code like en-UK didn't show up once.
I ran every page through the same validator that powers our free hreflang tool, and the data and scripts are in the research pack. The rule I follow is short: every language version names itself as canonical and lists itself and every other version in hreflang. Below I show how to check that on your own site.
How hreflang and canonical tags work together
Hreflang tells Google which URL serves which language, and the canonical names your preferred URL among copies (the glossary explains what hreflang is). They answer different questions, so they rarely clash while each language version keeps its own canonical.
According to Google's guide to localized versions, pages in different languages count as duplicates only when the main content stays untranslated. Your French and German pages are separate pages, so each keeps its canonical in its own language. Here's the pattern I'd use on every multilingual page, and you can copy it as it is.
<!-- on https://example.com/fr/pricing -->
<link rel="canonical" href="https://example.com/fr/pricing">
<link rel="alternate" hreflang="en" href="https://example.com/pricing">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing">
<link rel="alternate" hreflang="de" href="https://example.com/de/pricing">
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing">
The canonical points to the page itself, and the hreflang block is identical on all three versions. People miss that second part, because your English and German pages need the same four lines, each with its own canonical.
Self-referencing hreflang: list the page itself
A self-referencing hreflang is the line in the set that points to the page you're on. Google's documentation says each version must list itself as well as all the others, so I treat it as required, even though some audit tools call it optional. Nearly every canonical page I read did list itself, but on six sites a template dropped that line somewhere, which is why I count this error per site.
Where it failed, you could usually blame a template someone set up once and forgot. On two sites every subpage carried the homepage's hreflang set, so a product guide on an insurance site said its two regional versions were the homepages of two country sites. That page is missing from its own set, and its "alternates" point somewhere else.
To fix it, build your hreflang block from the current page's translations and render the same block on every version. A plugin setting that adds hreflang "sitewide" is fine only when it generates links per page.
Hreflang return links fail more often than language codes
A return link means that if page A lists page B as an alternate, page B lists page A too. Google ignores the tags unless both pages point to each other, so this rule decides whether your hreflang works at all.
Here's the twist. The codes were fine everywhere I looked, yet a quarter of the sites still broke the pairing somewhere, so start your own audit there. I count only links from pages whose canonical points to themselves, because a tracking-parameter copy gets no link back by design.
When a version skipped the link back, it was one of three things, and each needs a different fix on your side.
- The version lists its own set, but not this page. Usually a template copied the homepage's set onto subpages, or a translation didn't know its pair. Ignoring trailing slashes and letter case rescued none of these pairs.
- The version lists only itself. Some templates output a single self-referencing line on translated pages, which pairs that page with nothing.
- The version has no hreflang at all. Someone added a translated privacy policy or service page by hand, outside the system that writes the tags.
Hreflang and canonical conflict: point each language at itself
A hreflang and canonical conflict happens when a page lists itself as a language version but its canonical names a different URL. Google's guide to consolidating duplicate URLs says the canonical of a page in a hreflang set should be in the same language. When it's in another language, you tell Google two things at once: "this is the French page" and "the real page is the English one".
I found that kind of conflict on 4 of the 38 sites. On one, every language version I read, from French to Korean, pointed its canonical at the English page. Google indexes the canonical, so your French URL can drop out of the index and French searchers land on English.
Here's how I'd read the canonicals on your own site.
| What you see | Is it a problem? | What to do |
|---|---|---|
/fr/pricing canonical to /fr/pricing | no | keep it |
/fr/pricing?utm_source=mail canonical to /fr/pricing | no | keep it, this copy needs no hreflang of its own |
/en-us/pricing canonical to /pricing, listed as en-US | no, same language | make sure hreflang lists /pricing |
/fr/pricing canonical to /pricing (English) | yes | point the canonical at /fr/pricing |
| a terms page canonical to the homepage | yes | point the canonical at the terms page itself |
The fix is almost always one line in your template. Build the canonical from the current page's URL in its own language, with the host and protocol hardcoded. For how canonicals work with other signals, read my guide to canonical, sitemap and robots.txt.
Point hreflang at full URLs that answer 200
Every URL in your hreflang set should be absolute, answer 200 straight away and carry its own self-referencing canonical. Google's guide says alternate URLs "must be fully-qualified, including the transport method". A bare /fr/pricing won't do, yet a couple of sites in my sample still used relative paths.
An alternate that redirects carries no named penalty, but you've named one URL while Google indexes another. On a handful of sites at least one alternate redirected first. One site listed French, Japanese, Korean and Portuguese versions of product pages that existed only in English. Each sent a temporary redirect back to the English page.
On two sites hreflang pointed at URLs whose canonical named another address, which audit tools call "hreflang to non-canonical". On one of them it was a side effect of the cross-language canonical above. If a translation is missing, leave that language out of the page's set.
What Google ignores in hreflang
A few hreflang details matter much less than guides suggest. These, from Google's own documentation, save you time on false alarms.
- Letter case. Google treats codes as case-insensitive, so lowercase
pt-br, common in my sample, works likept-BR. - One-way annotations. If B doesn't list A, Google ignores the pair, however correct the codes are.
- A canonical tag with a hreflang attribute. Google ignores
rel="canonical"links that carryhreflangwhen it picks the canonical, so keep the two in separate tags. - Codes that aren't ISO.
UKisn't the country code for the United Kingdom (that'sGB), soen-UKhas no effect, and a country on its own can't stand in for a language. - Language detection. Google works out the language of a page itself, and it doesn't use hreflang or the
langattribute for that.
Three ways to implement hreflang and when to use each
Google accepts hreflang in HTML, in an XML sitemap or in an HTTP header, and treats the three as equivalent. They differ in how easy they are to maintain, so pick one and keep it as the only source for those URLs.
| Method | Where | When it fits | What to watch |
|---|---|---|---|
<link> tags in <head> | the HTML of every page | small and mid-sized sites, a CMS with a plugin | every language adds a line to every page |
| XML sitemap | xhtml:link under each <loc> | large sites with thousands of URLs | a stale sitemap points to old URLs |
HTTP Link header | the server response | PDFs and other non-HTML files | hard to inspect without curl or DevTools |
The rules are the same everywhere: full URLs, each version lists itself and all the others, and every target answers 200.
Search Console won't show you hreflang errors anymore
Plenty of guides still send you to the International Targeting report, but Google has retired it from Search Console, so finding missing return links and bad codes is now your job. That leaves you a crawler that collects hreflang from every page, a validator for single sets and URL Inspection, which shows the canonical Google picked.
The problem is common. In a 2023 Ahrefs study of almost 375,000 domains, over two thirds of domains using hreflang had at least one issue, most often a missing x-default. Bad language codes sat near the bottom of their list, which matches what I saw in my sample.
Add x-default for your language selector page
The x-default value names the URL Google should show when none of your languages matches the searcher. It's optional, and about half of the sites I checked used it. I'd add it whenever your homepage picks a language automatically or shows a selector. The same goes for redirects based on IP address or browser language. Point it at your selector or your main market's version, and use the same URL on every page of the set.
How to check hreflang and canonical on your site
On a small site this takes you about 15 minutes, and you don't need paid tools.
- Open one page of each template, such as the homepage, a product and an article, and view the source.
- Paste the hreflang lines into the hreflang checker. It flags bad codes, duplicates, relative URLs and a missing self-reference, but it reads only what you paste, so you check return links in step 4.
- Run the same URL through the canonical checker. The canonical should be the page itself, in the same language, and answer 200.
- Open two of the listed language versions. Each one should list the first page back, with the exact same URL, slash included.
- Paste a few hreflang URLs into the redirect checker, because each one should answer 200 without a hop.
- In Search Console, inspect a translated URL with URL Inspection and compare "User-declared canonical" with "Google-selected canonical". If Google picked another language, it treats your pages as copies.
How to explain hreflang and canonical to a client
I use a hotel comparison. The canonical is the room number on the door, and hreflang is the sign in the lobby that says "French guests, room 12; German guests, room 14". If room 12 has "see room 10" on its door, the French guests end up in the English room.
Clients ask why the sign hangs in every room. Google trusts a pairing only when both rooms confirm it, so show them one translated page and its pair side by side.
Check hreflang and canonicals across the whole site
The free tools check one page at a time, which is enough for your templates, but errors usually hide on single pages added outside the template, in half-translated products or after a migration.
In CometWeb Insight, our website audit app, a crawl goes through many pages of one project and records each page's HTTP status and scores. The same problem on many pages becomes one row on a single fix list, and reach is part of the ranking, so a template bug that breaks dozens of pages climbs above a one-off. Hreflang pairs for your key templates you still check in the free checker from step 2.
The free plan includes one project and a standard audit of up to 20 pages. You can create a free account and run it on your own domain today.
Final thoughts on hreflang and canonical
Language codes are the easy part, and on the sites I checked they were already right. The hard part is keeping your language versions in agreement, with the same set on every page, full URLs, a canonical in each page's own language and addresses that answer 200.
Tomorrow morning, open your most important translated page next to one of its pairs. Check that each lists the other with the exact same URL and names itself as canonical, then do the same for one page of every template, because a quarter of the sites I tested broke a pair somewhere. For redirects, my upcoming guide to canonical vs 301 redirects covers when each signal wins.
Frequently asked questions
Does every page need a self-referencing hreflang?
Yes, on every page that carries hreflang. Google's documentation says each language version must list itself and all other versions, so the same block appears on each page of the set.
Should hreflang URLs match the canonical URL exactly?
Yes. Each hreflang URL should be the canonical version of that page, with the same protocol, host and trailing slash, and it should answer 200 without a redirect.
Can I point the canonical of all language versions to one page?
No, unless the pages are untranslated copies. Translated pages aren't duplicates, so each one should name itself as canonical, and hreflang ties them together.
Is x-default required?
No, it's optional. Add it when a page has no single language, such as a homepage with a language selector or an automatic language redirect.
Is en-UK instead of en-GB a serious mistake?
Google ignores that code, because the ISO code for the United Kingdom is GB, but it didn't show up once on the 38 sites I checked. Return links and canonicals in another language break far more often.
Which hreflang method should I use, HTML or the sitemap?
With a few hundred pages, tags in the head are the easiest to check. With thousands of URLs and several languages, a sitemap generated from one source is simpler to maintain, as long as you don't combine both methods for the same URLs.
Sources
- Google Search Central: Tell Google about localized versions of your page.
- Google Search Central: How to specify a canonical URL.
- Google Search Central: Managing multi-regional and multilingual sites.
- Search Console Help: The International Targeting report is deprecated.
- Ahrefs, Patrick Stox: Over 67% of Domains Using Hreflang Have Issues (Study of 374,756 Domains).
- CometWeb: hreflang and canonical on 38 multilingual sites.
Disclosure: CometWeb Insight and the free tools under /tools are CometWeb products, and CometWeb publishes this blog.