hreflang explained for business owners

If your website exists in more than one language, someone has probably mentioned hreflang to you. It sounds technical, and the code behind it is. The idea, though, is simple enough to understand without any programming, and it is worth understanding, because a broken hreflang setup is one of the most common reasons why a multilingual site shows the wrong language to the wrong people.

What hreflang is

hreflang is a small annotation that tells search engines: “this page also exists in these other languages, and here are their addresses.” It is usually placed in the hidden head section of every page, although it can also sit in the XML sitemap or in the server’s HTTP headers.

Each entry pairs a language code with a URL. A tour page might list its English, German and Spanish versions, each with its own address. Optionally, the code can include a region, such as en-GB for English aimed at the United Kingdom or pt-BR for Portuguese aimed at Brazil.

Google explains the rules in its Search Central documentation on localised versions of your pages. That page is the primary reference if you or your developer want the exact syntax.

What it does

hreflang helps Google pick the right version for each searcher. Without it, a Dutch user searching for your business might be shown the English page, simply because it is older or has more links pointing to it. With correct annotations, Google understands that a Dutch version exists and can show that one instead.

It also clarifies that your language versions belong together. Pages that are translations of each other are not competing duplicates, they are alternatives for different audiences.

What it does not do

This is where expectations often go wrong. hreflang is a hint, not a command. Google may still show a different version if it has reasons to.

It does not improve rankings by itself either. A page in Italian ranks because it answers an Italian search well. hreflang only makes sure that, when Google has several language versions to choose from, it chooses the fitting one. If the Italian page does not exist or is thin, no annotation will make it appear.

And it does not translate anything. It only points to pages that must already exist, each at its own address, each with real content in that language.

x-default: the fallback

Alongside the language entries you can add one marked x-default. It tells Google which page to show when none of your languages matches the searcher. A Japanese user visiting a site in English, German and French, for example, would get the x-default version.

Most sites point x-default to their English version or to a language selection page. Either is fine. What matters is that it points to a real, working page.

The mistakes we see most often

hreflang only counts when it is confirmed from both sides. If the English page says “my German version is here”, the German page must say “my English version is here” as well. When the return link is missing, Google may ignore the pair. This often happens after someone adds a new language or a new page and updates only some of the versions.

Wrong codes

Language codes follow an international standard (ISO 639-1), and region codes follow another one (ISO 3166-1). The classic slip is “uk” for English in Britain. In the language position, “uk” means Ukrainian. English for the United Kingdom is en-GB. Similar errors include invented codes such as “en-EU” or using a country code where a language code belongs.

Pointing to redirects or broken pages

Every URL in the hreflang set should load directly with a normal response. If it redirects elsewhere or returns an error, the annotation points at something Google will not use. This often appears after a relaunch, when addresses change but the hreflang entries keep the old ones.

Translation widgets without separate URLs

Some sites translate their content with a browser widget or plugin that swaps the text on the same address. There is then nothing for hreflang to point to, since every language shares one URL and search engines only see the original. Adding hreflang tags to such a setup does not help. The fix is separate pages per language, as explained in multilingual websites vs. translate plugins.

Inconsistent canonical tags

Each language version should name itself as its canonical page. If the German page declares the English page as its canonical, you are telling Google that the German page is just a copy, and the hreflang entry pointing to it loses its meaning.

How to check your own site

You do not need special software to get a first impression. Open one of your pages in a browser, view the page source and search for “hreflang”. You should see one line per language, plus perhaps x-default, each with a full address.

Then check a few things by hand:

  • Does each listed URL open the right language version directly, without a redirect?
  • Does the page list itself as well as its alternatives?
  • Open one of the other language versions. Does it list the same set, including a link back?
  • Are the codes valid, such as en, de, fr, or en-GB rather than “uk”?

For larger sites, SEO crawler tools can check every page at once and report missing return links or broken targets. Google Search Console also shows which version of a page Google considers canonical when you inspect a URL, which helps you spot pages Google is treating as duplicates.

hreflang is one item on a longer list. Our checklist for international websites covers the rest. On the sites we build, every language has its own address and the hreflang set is generated automatically, so return links stay complete when pages are added. You can read more about that on our page about how our multilingual websites work.

More guides