Hreflang is an annotation that tells search engines which language or regional version of a page to show each user, so a visitor in London sees your UK page and a visitor in Dubai sees your Arabic or UAE English page. Set up correctly, it puts the right version in front of each market; set up badly, the wrong version ranks or your versions compete with each other.
It is also one of the most commonly broken parts of international SEO. There are about 880 monthly searches for “hreflang” in the US alone (Google Ads data, 2026). This international SEO guide explains how hreflang works, shows correct code, lists the errors that come up most often and walks through the domain decision and a rollout plan.
How hreflang works
Google groups the language and country versions of a page into a cluster. When one version ranks, Google can swap in the version that best fits the user’s language and location. Hreflang is not a ranking signal, and it does not add authority to any page.
It does help with near-duplicates. If your en-US and en-GB pages differ only in spelling, prices and shipping details, hreflang tells Google they are deliberate alternates rather than accidental copies. Google identifies a page’s language from its content, not from the HTML lang attribute, so the page itself must be genuinely localized.
Google also retired the country targeting setting in Search Console in 2022. That leaves hreflang, your domain structure and the content itself as the main geographic signals you control.
Hreflang codes
Each hreflang value has a language code and an optional region code:
- Language: ISO 639-1 codes such as en, fr or ar. This part is required.
- Region: ISO 3166-1 alpha-2 codes such as US, GB, AE or SA. This part is optional.
- Combined: language first, then region, such as en-GB or ar-AE. Case does not matter.
A region on its own is not valid. Common mistakes include en-UK (the correct code is en-GB), en-EU (EU is not a supported region code) and ar-GCC (the Gulf is not a country, and region codes have two letters).
Three ways to implement hreflang tags
You can add hreflang in the HTML head, in XML sitemaps or in HTTP headers. Pick one method per set of pages and use it consistently.
1. Link elements in the HTML head
This is the most common method. Each page lists every version in the cluster, including itself, plus an x-default fallback:
<link rel="alternate" hreflang="en-us" href="https://www.example.com/en-us/running-shoes/" />
<link rel="alternate" hreflang="en-gb" href="https://www.example.com/en-gb/running-shoes/" />
<link rel="alternate" hreflang="fr" href="https://www.example.com/fr/chaussures-de-course/" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/running-shoes/" />
The same four lines go on all four pages. That repetition is what creates the return links Google needs to trust the cluster.
For a Gulf retailer serving the UAE and Saudi Arabia in two languages, the block looks like this:
<link rel="alternate" hreflang="en-ae" href="https://www.example.com/ae-en/" />
<link rel="alternate" hreflang="ar-ae" href="https://www.example.com/ae-ar/" />
<link rel="alternate" hreflang="en-sa" href="https://www.example.com/sa-en/" />
<link rel="alternate" hreflang="ar-sa" href="https://www.example.com/sa-ar/" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/" />
Arabic pages should also set lang=“ar” and dir=“rtl” on the html element. Google does not use the lang attribute to detect language, but browsers, screen readers and other search engines do.
2. XML sitemap annotations
For large sites, or when templates are hard to edit, sitemaps are easier to maintain. Every URL entry lists all alternates, including itself:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://www.example.com/en-us/running-shoes/</loc>
<xhtml:link rel="alternate" hreflang="en-us" href="https://www.example.com/en-us/running-shoes/" />
<xhtml:link rel="alternate" hreflang="en-gb" href="https://www.example.com/en-gb/running-shoes/" />
<xhtml:link rel="alternate" hreflang="fr" href="https://www.example.com/fr/chaussures-de-course/" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.example.com/running-shoes/" />
</url>
<url>
<loc>https://www.example.com/en-gb/running-shoes/</loc>
<xhtml:link rel="alternate" hreflang="en-us" href="https://www.example.com/en-us/running-shoes/" />
<xhtml:link rel="alternate" hreflang="en-gb" href="https://www.example.com/en-gb/running-shoes/" />
<xhtml:link rel="alternate" hreflang="fr" href="https://www.example.com/fr/chaussures-de-course/" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.example.com/running-shoes/" />
</url>
<!-- Repeat the same block for the /fr/ and x-default URLs -->
</urlset>
3. HTTP headers
For PDFs and other non-HTML files, send hreflang in the HTTP Link header:
Link: <https://www.example.com/en-us/size-guide.pdf>; rel="alternate"; hreflang="en-us",
<https://www.example.com/fr/guide-des-tailles.pdf>; rel="alternate"; hreflang="fr",
<https://www.example.com/size-guide.pdf>; rel="alternate"; hreflang="x-default"
Common hreflang errors and how to fix them
Most hreflang problems come from a handful of repeat mistakes. A crawl that checks return links and status codes will find nearly all of them.
| Error | What happens | Fix |
|---|---|---|
| Missing return links | Google may ignore the annotations | Every page must reference all others, and each must reference it back |
| No self-reference | The cluster is incomplete | Include the page itself in its own set |
| Invalid codes such as en-UK or ar-GCC | The value is ignored | Use ISO 639-1 language and ISO 3166-1 alpha-2 region codes |
| Region without a language | The value is ignored | Always start with the language code |
| Hreflang pointing to non-canonical URLs | Conflicting signals, annotations dropped | Point only to canonical, self-referencing URLs |
| Hreflang pointing to redirects, 404s or noindex pages | Broken clusters | Only list live, indexable URLs that return 200 |
| Relative URLs | URLs can be misread | Use absolute URLs, including the protocol |
| Canonical tags pointing across languages | Google may drop the localized version | Each version should canonicalize to itself |
| Tags injected late with JavaScript or placed in the body | Google may miss them | Put tags in the head of the initial HTML, or use sitemaps |
| Two methods with conflicting values | Unpredictable results | Keep one source of truth |
One more issue sits outside the tags. Automatic redirects based on IP address or browser language can stop Googlebot, which crawls mostly from US addresses, from ever seeing your other versions. Show a suggestion banner instead and let users choose.
ccTLD vs subfolder vs subdomain
Your domain structure is the other half of international SEO. Each option can work, but they differ sharply in cost, authority and effort.
| ccTLD (example.fr) | Subfolder (example.com/fr/) | Subdomain (fr.example.com) | |
|---|---|---|---|
| Country signal | Strongest | Moderate, via hreflang and content | Moderate, via hreflang and content |
| Authority | Built separately for each domain | Shared with the main domain | Partly shared, often treated more separately |
| Cost and maintenance | Highest | Lowest | Medium |
| Local trust | High in some markets | Depends on content and local signals | Depends on content and local signals |
| Best for | Brands with local entities, budgets and teams in each country | Most brands entering new markets | Separate platforms or teams per market |
For most businesses, the ccTLD vs subfolder decision comes down to authority. Subfolders let every new market start with the strength of your main domain, while a new ccTLD starts close to zero. ccTLDs make more sense when you have a local legal entity, local marketing budgets and a reason to look local, and some ccTLDs have registration requirements of their own.
Note that Google treats a few ccTLDs, such as .io and .co, as generic domains, so they do not carry a country signal. Moving from ccTLDs to subfolders, or the reverse, is a full site migration, so plan it with an SEO migration process that maps every redirect and hreflang change.
A step-by-step international SEO rollout plan
- Research demand per market. Run separate keyword research for each language and country instead of translating your English keywords. Search terms, volumes and intent differ, even between the US and the UK.
- Choose your structure. Decide between ccTLDs, subfolders and subdomains, and whether each version targets a language (fr) or a language and country (fr-CA).
- Map equivalent URLs. Build a sheet that lists each page and its equivalent in every market. Localize slugs where it helps users, such as /chaussures-de-course/ for French.
- Localize, not just translate. Adapt currency, units, spelling, examples, legal terms, shipping and payment options. Have a fluent speaker review every template and key page.
- Implement hreflang and canonicals. Add self-referencing canonicals, complete hreflang sets and an x-default for each cluster.
- Validate before and after launch. Crawl the site to check return links, codes and status codes, then monitor indexing for each version in Search Console. Adding each subfolder as its own property makes market-level reporting easier.
- Build local authority. Earn links and mentions from publications, directories and partners in each market. A translated page with no local signals rarely outranks local competitors.
- Measure by market. Report rankings, traffic and conversions for each country and language separately, and check how AI answers describe your brand in each language.
Our international SEO service follows this plan, and our technical SEO team handles implementation and validation. If you are unsure whether your current setup is working, a free SEO audit will check your hreflang clusters, canonicals and market-level indexing.
International SEO in Europe and the Gulf
In Europe, many companies in the Netherlands, Belgium and the wider EU want to grow in English-speaking markets as well as at home. That usually means an English version with en or en-GB targeting, copy written for each English-speaking market and measurement set up to respect consent rules, as covered in our guide to measuring SEO under GDPR. Brands selling into France or French-speaking Belgium add fr-FR or fr-BE versions. Our Netherlands page covers how Dutch companies use English-language SEO to grow abroad.
In the Middle East, bilingual Arabic and English SEO is the norm. Each language needs its own keyword research, including Arabizi and mixed-language queries, plus right-to-left layouts that render correctly on mobile. Hreflang pairs such as ar-AE, en-AE and ar-SA must be complete, which is where many e-commerce platforms introduce conflicts.
Getting the foundations right
Hreflang is not complicated, but it is unforgiving. One missing return link or invalid code can undo a cluster, and small errors multiply across thousands of pages. Choose a sensible structure, implement one clean method, validate it on every release and give each market localized content worth ranking.