Skip to content

International SEO

Hreflang Basics for Websites in More Than One Language

By Shayan Ahmad · · 7 min read

Hreflang Basics for Websites in More Than One Language (WhiteLinko blog banner)

If your site has more than one language, or more than one country version of the same language, Google needs a clear signal about which page is meant for which audience. That signal is hreflang. The idea is simple, and the mistakes are usually simple too: missing return tags, messy language codes, and no x-default for everyone else. This is a plain-English version of the rules, without the theory you do not need on day one.

What Hreflang Is For

Hreflang tells search engines that a set of pages are equivalents in different languages or regions, and which one should be shown to which user. It does not translate the page, and it does not, by itself, make a weak page rank. It helps Google choose the right version instead of showing a French speaker the English page, or showing a Canadian visitor the UK one when you have a local alternative.

You need hreflang when you have real alternative pages, such as:

  • The same article in English and German.
  • A product page for the United States and a separate one for the United Kingdom, with different wording, currency or shipping.
  • A homepage for each country you serve, even if some of them share a language.

You do not need it for a single-language site, or for a page that has no equivalent in another language. A machine-translated copy that is not ready for people is also a poor candidate. Hreflang works best when each version is a genuine, useful page for that audience.

For a fuller picture of how language and country versions sit together, including URL structure, our international SEO service covers the wider setup. This article stays on the hreflang rules themselves.

The Rules That Matter

You can place hreflang in the HTML head, in HTTP headers, or in the XML sitemap. HTML annotations in the head are the easiest to inspect on a small or mid-sized site. Sitemaps can be more practical when you have a very large set of alternates. Pick one primary method and keep it consistent, rather than mixing conflicting signals.

Use the right language and region codes

The language code comes first, in ISO 639-1 form, such as en, de or fr. If you need to target a region as well, add the country code, such as en-GB, en-US or fr-CA. The language is required. The region is optional, and it should only be added when the pages are genuinely different for that country.

Do not invent codes, swap the order, or use a country on its own. "UK" or "GB" without a language is not a valid hreflang value. "en-UK" is also wrong; the country code for the United Kingdom is GB.

Every page in the set must list every other page, including itself

If English, German and French versions of an article exist, each of those three pages should include hreflang tags for English, German and French, and each should include a self-referencing tag for its own URL. This is the return-tag rule, and it is the one that breaks most often.

A missing return tag usually happens when one template is updated and another is not, or when a new language is added to some pages only. Google may then ignore the annotation for that pair. When you add a language, add it to the whole set, on every member of the set.

The URLs must be the real, canonical versions

Hreflang should point at the final, indexable URL: the HTTPS address, on the correct host, without a tracking parameter or a redirect. If the canonical of a page is a different URL, the hreflang should use that canonical URL, not a variant. Annotations that point at redirected or noindexed pages are wasted.

The pages in a set should also agree with each other. If the English page claims the German equivalent is URL A, and the German page canonicalises to URL B, you have given Google two different stories.

x-default, and Who It Is For

x-default is a special hreflang value that points to the page you want shown when none of the other languages or regions match. It is not a fourth language. It is the fallback.

A typical pattern is a language chooser, or the most general version of the site, often the international English homepage. For an article that only exists in two languages, x-default often points at the same URL as your primary version. That is allowed. The point is that a visitor from a country you have not built a version for still has a clearly nominated page.

You should include x-default in the set alongside the language tags, and it should appear on every member of the set, just like the others. It will not fix a missing translation, but it does stop Google having to guess when the user sits outside your listed regions.

A Practical Way to Implement and Test

Before you write a single tag, make a map: each page, its language or region, and the URLs of all of its equivalents. Keep that map in a sheet. It is much easier to generate consistent tags from a map than from memory inside several templates.

  1. Decide the URL structure you already have, or should have: folders such as /de/, subdomains, or country domains. Hreflang can work with all of them. It does not replace a clear structure.
  2. Generate self-referencing and return tags for every member of each set, plus x-default.
  3. Make sure internal links on each version point at the same language, rather than sending a German visitor back to the English nav.
  4. Use the Search Console International Targeting or hreflang reports you have available, and inspect a sample of URLs. Look for unknown codes, missing return tags, and annotations to URLs that redirect.
  5. Search Google from, or as, a user in the target country, or use a comparable test, and see which version is selected for a few brand and page-title queries. This is a spot check, not a complete proof, but it will catch obvious mix-ups.

Automatic redirecting of visitors based on IP address often fights hreflang. If a crawler or a person cannot reach the other language versions, the annotations cannot do their job. Let people and crawlers open each URL directly, and offer a clear language or country choice rather than a forced, silent redirect.

On a store, platforms sometimes add hreflang for you, and sometimes they only add it in part. Check the published HTML rather than trusting the setting name. Shopify Markets, for example, can help, but you should still confirm the tags, the return links and the x-default on a sample of product and collection pages. A technical SEO review, or a dedicated pass inside an SEO audit, is the right place to validate this when you have many countries or a mix of languages. For how this work sits in a broader technical programme, see our comparison of technical SEO with JDR Group.

FAQs

Does hreflang improve rankings?

It is not a ranking boost in the usual sense. Its job is to help Google serve the right language or country version. The pages still have to be useful and well built. What you often see, when it works, is the correct URL appearing in the correct places, rather than a jump in raw authority.

What happens if a return tag is missing?

Google may ignore that pair of annotations. The rest of the site can continue as normal, but those two pages will not have a reliable relationship. This is why a map, and a template that always outputs the full set, is safer than hand-editing a few heads.

Do I need hreflang for English in several countries?

If the pages are genuinely different, yes, use en-US, en-GB and so on, and still include the return tags. If the content is identical and you only have one English page, do not invent country versions. One English page, perhaps with x-default pointing at it, is enough.

Can I use hreflang and a canonical together?

Yes, and you should. Each language or country version should have a self-canonical to its own URL, and hreflang should point at those same URLs. Do not canonicalise every language back to the original if you want the translations indexed as their own pages.

Going Live With More Than One Language?

If you are adding a second language or a country version and you want the annotations to be right before they scale, I can check the map, the return tags and the x-default against the live HTML. Request a free SEO audit and we will look at a sample of pages together.

  • hreflang
  • international seo
  • multilingual
  • x-default
  • technical seo

Have a question about this for your own site?

A 15-minute call is usually enough to tell whether it applies to you and what to do first.

Book a 15-min callGet My Free SEO Audit

Related posts

All blog posts →

Talk to WhiteLinko

Want this applied to your site?

Book a 15-minute call to talk through your goals, or start with a free SEO audit: a prioritised list of fixes, reviewed by a specialist.

Free PDF · 2026 edition

The WhiteLinko SEO Checklist

Six pages of tick boxes: technical, on-page, content, local, links, AI search and GA4.

Get the checklist
Free SEO Audit