Losing clicks to competitors? Find out exactly why, and what to fix first.

Show me why
Skip to content

International SEO

Multi-Country Website SEO: Hreflang Explained

Add saadrazaseo.com as a preferred source on Google

Takes about a minute. You hear back from me personally.

Short answer: Hreflang is an annotation, added in the HTML head, an XML sitemap or HTTP headers, that tells Google which version of a page is meant for which language and country. You need it when you publish translated or near-identical pages for different markets, such as English pages for the UK, US and Pakistan. Every version must list itself and all its alternates, and the links must point both ways.

67%of 374,756 domains using hreflang had at least one implementation issueAhrefs, 2023
15.3%of those domains were missing reciprocal (return) tags, which makes Google ignore the annotationAhrefs, 2023
76%of online shoppers prefer to buy with product information in their own language (8,709 consumers, 29 countries)CSA Research, 2020

This guide is for anyone running a site with more than one country or language version: exporters, SaaS companies, e-commerce stores and agencies working across markets. By the end you will know whether you need hreflang at all, which codes to use, which of the three implementation methods suits your site, and how to check that it works. There is a short decision flow to answer the first question in under a minute.

What hreflang does, and what it does not

Hreflang is a labelling system, not a ranking boost. If several URLs serve the same content for different audiences, hreflang helps Google show the right one to each searcher, so a reader in Lahore sees your Pakistan page in rupees and a reader in Leeds sees your UK page in pounds. The pages still have to earn their rankings; hreflang only decides which sibling is shown.

Two points from Google’s documentation on localised versions are worth knowing. Google does not use hreflang or the HTML lang attribute to detect a page’s language; it works that out from the content. And if two pages do not both point to each other, the tags are ignored. Hreflang is a hint that works only when the whole cluster agrees.

Do you need hreflang?

Many sites add hreflang they do not need, and many that need it leave it out. Work through the questions below.

Does your site need hreflang?

Do you have more than one URL serving the same content for different languages or countries?

Is the content on those URLs genuinely equivalent (same page purpose, translated or localised)?

Are the versions in different languages?

Same language, but do the versions differ meaningfully by country (prices, currency, spelling, shipping, legal details)?

Result: no hreflang needed. A single version of each page has nothing to annotate. Focus on content and on choosing the right site structure if you plan to expand.

Result: leave these pages out. Hreflang should only connect true equivalents. A page with no real counterpart should stand alone rather than point to a loosely related page.

Result: yes, use language codes. Annotate each language version (for example en, ur, ar), add region codes only where a version targets one country, and add an x-default.

Result: yes, use language plus region codes. This is where hreflang matters most, because same-language pages look like duplicates. Use values such as en-gb, en-us and en-pk.

Result: you probably do not need separate versions. If the pages are the same apart from the URL, merge them into one page for everyone. That removes the maintenance and the duplication.

Settle the structure question before writing any markup. My comparison of ccTLDs, subfolders and subdomains covers which URL pattern suits your situation, because hreflang sits on top of that decision rather than replacing it.

Rather have an expert do this for you?

Hand it over and get back to running your business.

Hand it over to me

Language and region codes

The value has two parts: a language code from ISO 639-1, then optionally a region code from ISO 3166-1 Alpha 2, joined by a hyphen. Google supports only those two standards.

Intended audienceCorrect valueCommon wrong value
English speakers in the United Kingdomen-gben-uk
English speakers in the United Statesen-usus (region alone is invalid)
English speakers in Pakistanen-pkpk-en (order reversed)
Urdu speakers, any countryururdu or ur-pk when the page is not Pakistan-specific
Arabic speakers in the UAEar-aeae-ar
Any English speaker, no country focusenen-global or en-int

A language can stand alone; a region cannot. The UK’s code is gb, not uk, and that one mistake appears on more international sites I audit than any other. Only use a region code when you genuinely have a page for that country. If your English page is the same for everyone, one en entry is cleaner than a dozen country entries.

A Pakistan-specific note on Urdu and Roman Urdu

Roman Urdu (Urdu written in Latin script) has no separate ISO 639-1 code. If you publish an Urdu page in Nastaliq script and a Roman Urdu version, they cannot be told apart by hreflang codes alone, so I usually recommend choosing one of them as the Urdu page and keeping the other out of the cluster. If you are researching which form your audience actually searches in, my guide to international keyword research covers how to check.

Three ways to implement hreflang

Google treats the three methods as equivalent. Pick one per set of pages and stay with it; keeping the same data in two places is how contradictions creep in.

MethodBest forWatch out for
HTML link elements in the headSmall and medium sites, CMS pluginsAdds code to every page; plugins can drop tags on some templates
XML sitemap with xhtml:linkLarge catalogues, many languages, generated from a databaseMust declare the xhtml namespace; must be regenerated when URLs change
HTTP Link headerPDFs and other non-HTML filesHarder to inspect; needs server configuration
Worked example: head tags for a UK, US and Pakistan pricing page

Each of the three country pages, and the global default, carries the same four lines in its head:

<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/pricing/" />
<link rel="alternate" hreflang="en-us" href="https://example.com/us/pricing/" />
<link rel="alternate" hreflang="en-pk" href="https://example.com/pk/pricing/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing/" />

The UK page’s list includes the UK page itself, which is the self-reference. Each country page has a canonical tag pointing to itself, not to the US page. Every URL is absolute, including https. When the team later adds an Urdu page, all four existing pages gain a fifth line, and the new page gets all five. A generator that builds these lines from one table of equivalents keeps them in step automatically.

My free hreflang tag generator builds the head tags or sitemap entries for a set of URLs, which removes most typing errors.

The rules that break most implementations

When Ahrefs studied 374,756 domains in 2023, 67% had at least one hreflang issue. The most common were a missing x-default (56.3%, which is a recommendation rather than a requirement), missing self-references (18%), links to redirected or broken pages (16.9%) and missing return tags (15.3%). These are the rules to check first.

Return tags

If page A points to page B, page B must point back to A, or Google ignores the pair. When you add a country, every existing version needs updating as well as the new one. This is why a templated or generated approach beats hand editing.

Self-reference

Each page lists itself in its own set. Google’s documentation states that each language version must list itself as well as all other versions.

x-default

x-default names the page for searchers whose language or region matches none of your versions: usually a global English page or a country selector. It is optional but gives you control over the fallback.

Canonicals must agree

Each version should canonicalise to itself. If your Pakistan page canonicalises to your US page, you are telling Google to ignore the Pakistan page while hreflang says it matters. Hreflang targets should also return 200, be indexable and not be blocked in robots.txt.

No automatic IP redirects

Google’s guide to managing multi-regional sites advises against adapting content by IP and against automatic redirects between language versions, because Googlebot and users may never see the other versions. Offer a visible country or language switcher instead.

How to check your hreflang

Search Console’s old International Targeting report has been retired, so do not go looking for it. Use these instead:

  1. URL Inspection. Inspect a page and compare the user-declared canonical with the Google-selected one. If Google picked a different language version, your signals conflict. My URL Inspection tool guide explains what each field means.
  2. A site crawler. Screaming Frog or Sitebulb can extract hreflang from the head, sitemap and headers, then report missing return tags, non-indexable targets, invalid codes and conflicting canonicals across the site.
  3. View source on a sample. Open a handful of live pages and confirm the rendered markup matches what your CMS claims to output.
  4. Search from the target market. Run a branded query with a localised setting and see which URL appears. It is a sanity check, not proof.

Hreflang implementation checklist

  • Need confirmed: you have genuinely equivalent pages for different languages or countries.
  • Structure chosen: ccTLD, subfolder or subdomain decided before markup.
  • Valid codes: ISO 639-1 language first, optional ISO 3166-1 region second.
  • UK code: en-gb, never en-uk.
  • Self-reference: every page lists itself.
  • Return tags: every page in a cluster lists every other page.
  • Absolute URLs: full https URLs, no relative paths.
  • x-default: set to a global page or selector.
  • Self-canonicals: each version canonicalises to itself.
  • Clean targets: no redirected, noindexed, blocked or 404 URLs in any cluster.
  • One method: head, sitemap or headers, not a mix that disagrees.
  • No forced redirects: visible switcher instead of IP-based redirects.
  • Generated, not hand-edited: one source table produces every cluster.
  • Re-crawl: crawler check after every new market launch.

Ticks are saved in your browser.

Where hreflang fits in a bigger plan

Hreflang tells search engines which page to show. It does not decide what each country page should say. Currency, local proof, spelling and tone matter, and the audience differs more than most teams expect; that matters commercially, since CSA Research’s 2020 survey found 40% of shoppers will never buy from websites in other languages. For translation strategy, see multilingual SEO. For two worked market comparisons, read what changes when you target US businesses and the differences between UK and Pakistan SEO. Pakistani exporters building their first foreign-market pages will find the wider plan in international SEO for exporters.

Frequently asked questions

Does hreflang help my pages rank higher?

No. It adds no ranking strength. It helps the right version appear for the right searcher, so fewer visitors land on a page in the wrong language or currency.

Can I use hreflang across different domains?

Yes. Annotations can link pages across country domains, subdomains and subfolders. The same rules apply: absolute URLs, return tags and self-references.

Do I need hreflang if I only have one English page for everyone?

No. Hreflang is for sets of alternate versions. A single page serving all English speakers has nothing to annotate.

Is x-default required?

No, but I recommend it. Without it, Google picks a fallback for searchers who match none of your versions. With it, you choose.

What is the difference between hreflang and the lang attribute?

The HTML lang attribute declares the language of the page you are on, mainly for browsers and screen readers. Hreflang points to alternate versions of the page for other languages or regions. Google says it uses neither to detect a page’s language, so set both correctly but let the content itself be clearly in one language.

Sources

  • Google Search Central, “Tell Google about localized versions of your page” (updated 2026).
  • Google Search Central, “Managing multi-regional and multilingual sites” (accessed 2026).
  • Ahrefs, “67% of Websites Using Hreflang Have Issues” study of 374,756 domains (2023).
  • CSA Research, “Survey of 8,709 Consumers in 29 Countries Finds that 76% Prefer Purchasing Products with Information in their Own Language” (2020).

Hreflang errors are tedious to find by hand and easy to reintroduce with every site update. If you would like a second pair of eyes on your multi-country setup, my international SEO services include a full hreflang and canonical review, or you can request a free audit.

Rather have an expert do this for you?

Tell me about your website and goals, and I will reply with a free first review.

Your details are only used to reply to your request. No spam.

Grow my trafficCall