Guide

What Is Hreflang and When Should You Use It?

If your website serves users in multiple countries or languages, there’s a good chance Google is showing the wrong version of your content to the wrong people. Hreflang is the HTML attribute that solves this problem — it signals to Google which language or regional variant of a page should be displayed to users in a given location or speaking a given language.

Many businesses with international audiences have never implemented hreflang, and the result is that US visitors land on a UK page, or French speakers are served English content. This guide explains how hreflang works, when you actually need it, and how to implement it without making common mistakes.

How hreflang works

Hreflang is an HTML link attribute — or alternatively an HTTP header or XML sitemap tag — that maps each page to its equivalent in other languages or regions. For example, if you have an English page and a French translation of the same page, hreflang tells Google: “this URL is in English for English speakers; this other URL is in French for French speakers.”

Google then uses this information to serve the most appropriate version in search results. A user in France who searches in French will see your French URL; a user in the UK searching in English sees your English UK URL. Without hreflang, Google makes its best guess — often incorrectly.

The attribute accepts two types of values: language codes (like “en” for English or “fr” for French) and combined language-region codes (like “en-GB” for English in the UK, “en-US” for English in the US, or “fr-FR” for French in France). You can use language-only tags for pages that serve all speakers of that language regardless of location, or language-region tags when you have distinct content for different countries.

When you actually need hreflang

You need hreflang when you have multiple versions of a page targeting different languages or different regional audiences. Common scenarios include: a website with both English and Spanish versions; a UK business that also has a US site with adjusted pricing and spelling; or an e-commerce store with country-specific pricing and product catalogues.

You don’t need hreflang if your site is entirely in one language and targets one country. And you don’t need it simply because you sell internationally — if your UK English site serves customers worldwide, that’s fine without hreflang as long as you’re not creating separate language or regional versions.

It’s also worth knowing that hreflang doesn’t help with duplicate content issues on its own — that’s what canonical tags are for. Hreflang is specifically about helping Google match the right audience to the right content when language or region is the differentiating factor.

How to implement hreflang correctly

The most common implementation is via link tags in the HTML head of every page. Each page in your set must reference every other language or region variant — including itself. So an English UK page and a French France page must each contain two hreflang tags: one pointing to itself and one pointing to the other. This bidirectional linking is essential; if one side is missing, Google ignores the entire set.

You should also include an “x-default” hreflang tag, which tells Google which page to show users who don’t match any of your specified language-region combinations. This is typically your main or most universal language version.

Common mistakes include inconsistent URLs between the hreflang tags and the actual page URLs, missing self-referential tags, and forgetting to include x-default. After implementation, Google Search Console’s “International targeting” report will flag hreflang errors so you can diagnose and fix them.

FAQs

Common questions.

Does hreflang affect search rankings?
Hreflang doesn’t directly boost rankings, but it ensures that the right version of your page ranks for the right audience. Without it, the wrong language or regional version may rank in certain markets, leading to poor user experience and lower engagement — which can indirectly harm your performance in those markets.
Can I use hreflang in an XML sitemap instead of HTML tags?
Yes. You can implement hreflang in your XML sitemap as an alternative to HTML tags, which is often more practical for large sites where adding tags to every page is difficult. The logic is the same — each URL must list all language-region variants including itself — but the syntax differs slightly. Google supports all three implementation methods: HTML, HTTP headers, and sitemap.
What happens if I get hreflang wrong?
Google will typically ignore incorrectly implemented hreflang and fall back to its own judgement about which version to serve. This means you’re back to the original problem of the wrong audience seeing the wrong content. Errors are reported in Google Search Console’s International Targeting report, making diagnosis straightforward once you know where to look.
Related guides

More on web design & ux.

Want a hand putting this into practice?

Book a free, no-obligation consultation with a Norwich-based specialist.

Book a free consultation
Get started

Let's put your business in a better light.

Book a free, no-pressure consultation. We'll talk through your goals and tell you honestly what we'd do — whether you work with us or not.

  1. 01
    Tell us a bitFill in the form — two minutes, tops.
  2. 02
    We'll call you backWithin one working day, no pressure.
  3. 03
    Get a clear planHonest advice and a fixed quote.

Free · No obligation · We reply within one working day

Book a free consultation