Skip to content
Koit Academy

Websites & SEO

·

8 min read

Common Hreflang Mistakes, and How to Fix Each One

The hreflang errors that make Google ignore a site's language versions, from missing return links and en-UK to relative URLs, and the fix for each.

By Koit Academy

Hreflang is the annotation that tells search engines a page has versions in other languages or for other regions, so a searcher in Germany is shown the German page and one in the UK the British one. When it works, nobody notices. When it does not, the wrong version appears in the wrong country, or several versions compete for the same searches, and the cause is almost always one of a handful of mistakes.

The frustrating part is that hreflang fails silently. Google does not show an error on the page; it simply ignores the annotations it cannot use.

How hreflang is meant to work

Each version of a page carries a set of annotations: one for itself and one for every other version, each with a language code, an optional region code and the full address. The set is the same on every version. Google’s guide to localized versions puts the two core rules plainly: each language version must list itself as well as all other language versions, and if two pages do not both point to each other, the tags are ignored.

Page A lists page B as its German version, but page B does not list page A. Because the annotations must be reciprocal, Google ignores the pair.

This usually happens when versions are edited separately: someone adds a new French page and updates its tags, but not the English and German pages that should point to it. The fix is to treat the set as one unit. Generate it once, and put the identical block on every version.

Mistake 2: a page that does not list itself

A version that lists the others but leaves itself out breaks the set in the same way. It is an easy mistake when tags are written by hand per page, because listing the page you are on feels redundant. It is required.

Mistake 3: invalid language and region codes

The first part of each code is an ISO 639-1 language code; the optional second part is an ISO 3166-1 alpha-2 region code. Several codes look right and are not:

WrittenProblemCorrect
en-UKUK is not the ISO region code; Google says it has no effecten-GB
jpA country code used as a languageja
czA country code used as a languagecs
grA country code used as a languageel
GBA region on its own; a language must come firsten-GB
en-EUEU has no effect in Google Searchen, or one code per country

The hreflang tag generator checks every code against the full ISO lists, rejects the ones Google ignores and suggests the likely intended language code for the common mix-ups.

Mistake 4: relative or protocol-less URLs

Hreflang addresses must be fully qualified: https://www.example.com/de/, not /de/ and not //www.example.com/de/. Google’s guide is specific about including the protocol. A relative path is the commonest error in hand-written tags, because relative links work everywhere else on a site.

Mistake 5: pointing to pages that redirect or are not indexable

Every address in the set should return the page itself: not a redirect, not an error, not a page marked noindex, and not a page whose canonical tag points somewhere else. If the German address redirects to a language chooser, or carries a canonical to the English page, the annotation points at something Google will not treat as the German version.

Mistake 6: one URL claimed by several languages by accident

Two codes pointing at the same address are allowed when one page genuinely serves several regions, for example en-GB and en-IE both pointing to a single English page for the UK and Ireland. When it happens by accident, usually through a copy-and-paste error, one market gets the wrong page. The generator flags shared addresses so you can confirm each is intended.

Mistake 7: forgetting x-default

x-default is optional. It names the page for searchers whose language or region is not in the set, often the main version or a language chooser. Without it, Google picks what it thinks is closest. Add it when you have a sensible default; leave it out rather than pointing it at a page that is not meant for everyone.

When to add a region code

A language code on its own, such as de, says the page is for German speakers anywhere. A language and region, such as de-AT, says it is for German speakers in Austria. Add a region only when the pages genuinely differ by country: different prices or currency, different products, different legal wording, different spelling or vocabulary that matters to the reader. If the German page is the same for Germany, Austria and Switzerland, de is enough, and three region codes pointing to one page add complexity without benefit.

When some regions have their own page and others do not, combine the two: de-AT for the Austrian page and de for everyone else who reads German. A searcher whose language and region match a specific code gets that page; others who match only the language get the general one.

Hreflang and canonical tags together

Each language version should carry a canonical tag pointing to itself, not to the main language version. A German page whose canonical points to the English page is telling search engines it is a duplicate of the English page, which contradicts the hreflang annotation that calls it the German alternative. Self-referencing canonicals on every version, plus the same hreflang set on each, is the combination that works.

Automatic redirects by location

Sending visitors to a language version based on their IP address or browser language seems helpful, and often backfires. Crawlers usually visit from one country and may never see the other versions, and a person who prefers the English page while travelling cannot reach it. A better pattern is to show every visitor the page they asked for, with a clear link or banner offering the version that matches their language, and let hreflang guide search engines to show the right version in the first place.

Tags in the head or in the sitemap

Hreflang can be given as link tags in each page’s head, as HTTP headers for files that are not HTML, or as entries in a sitemap. The information is the same; what differs is maintenance. Tags are simplest for a few pages. A sitemap keeps the whole set in one file, which is easier when there are many versions or many pages; build the base sitemap with the XML sitemap generator and the hreflang entries with the hreflang generator’s sitemap format.

Use one method per set. Mixing tags on some pages and sitemap entries for others makes it easy for the two to disagree.

Who needs hreflang

Hreflang solves one problem: several versions of the same content for different languages or regions, where the wrong one might be shown. A site in one language for one country does not need it. A site with the same content in English for the United States and the United Kingdom, with different prices or spelling, does. So does any site translated into other languages. If you are unsure, look at whether two of your pages could reasonably compete for the same search in different places; if they could, hreflang tells search engines which one belongs where.

Testing a set before it goes live

Generate the full set, then read it once as a table: every version, its code and its address. Each row should be a page that exists, returns a 200 status, carries a canonical pointing to itself and will carry this same set. Fix anything that fails before publishing, because a set with one broken member is easy to miss afterwards: nothing errors, and the rest of the set quietly stops working for that page.

Checking a site’s hreflang

Pick one page and view the source of every version. Each should carry the same block, including itself, with full addresses and valid codes. Then open each address in the block and confirm it returns the page directly, with a canonical tag pointing to itself. Repeat for a page from each section of the site, because templates often differ between sections. If a site has moved any of these pages recently, check that the hreflang addresses were updated too; the order of work for a move is in how to change a URL without losing SEO.

Local businesses with a site per country have one more thing to align: the business details on each version. The local business schema generator writes the markup for each location’s page.

Sources, read November 14, 2026: