
What Are Hreflang Tags?
Hreflang tags are annotations that tell search engines which language or regional version of a page to show to which users. They connect equivalent pages, such as English, French and Arabic versions, so each searcher sees the right one. Every version must list all the others and itself. Missing return links are the most common reason hreflang is ignored.
| Element | Rule | Example |
|---|---|---|
| Language code | ISO 639-1; required | en, fr, ar |
| Region code | ISO 3166-1 Alpha 2; optional | en-GB, ar-EG, fr-CA |
| Script code | ISO 15924; optional | zh-Hant, zh-Hans |
| x-default | Fallback for unmatched users | A language selector or global page |
| Self-reference | Each page lists itself | Required |
| Return links | Each listed page links back | Required |
| URLs | Fully qualified, with protocol | https://example.com/fr/ |
The rules come from Google’s guide to localized versions of your pages.
What Do Hreflang Tags Do, and Not Do?
They help search engines serve the appropriate version. Google says hreflang lets Search point users to the most appropriate version of your page by language or region.
They do not:
- Improve rankings. Hreflang swaps which version is shown; it does not lift a page.
- Detect language. Google determines a page’s language from its text.
- Replace translation. Each version still needs real content.
- Force a result. They are signals, not commands.
- Work on every search engine. Google and Yandex support hreflang; Bing relies mainly on other signals, such as the content-language meta tag.
When Do You Need Hreflang?
You need it when equivalent content exists for different languages or regions.
| Situation | Hreflang needed? |
|---|---|
| Site in one language, one country | No |
| Fully translated versions in several languages | Yes |
| Same language, different countries, with regional differences (prices, spelling) | Yes |
| Only the template is translated; content is the same language | Yes; Google names this case |
| A single page translated, the rest not | Only for that page |
| Different content per market, not equivalents | No; they are separate pages |
Google gives three example scenarios: pages where only navigation is translated, pages with small regional variations in one language, and fully translated sites.
Where Do Hreflang Tags Go?
In one of three places. Google says the three methods are equivalent, and you should choose one.
1. HTML head
A link element for each version, in the head of every version. For example, on each page: a link with rel=”alternate”, hreflang=”en” and the English URL; another with hreflang=”fr” and the French URL; another with hreflang=”x-default”.
Best for small sites.
2. HTTP headers
A Link header listing each alternate. Needed for non-HTML files, such as PDFs.
3. XML sitemap
Each URL entry contains child elements listing every language version, including itself.
Best for large sites, since annotations stay out of the page code and are managed in one place.
Using several methods adds maintenance and risks conflicts. Pick one.
How Do You Write the Codes?
Combine a language code with an optional region code.
| Target | Code |
|---|---|
| English, any region | en |
| English, United Kingdom | en-GB |
| English, United States | en-US |
| Arabic, any region | ar |
| Arabic, Egypt | ar-EG |
| French, Canada | fr-CA |
| Chinese, Traditional script | zh-Hant |
| Fallback | x-default |
Rules:
- Language first. You cannot specify a country alone; “GB” by itself is invalid.
- Use GB for the United Kingdom, not UK.
- Codes such as EU or LATAM are not valid. Regions like “es-419” are not supported.
- Codes are not case-sensitive, though en-GB is the convention.
- One URL can carry several codes, if it serves several regions.
Want this handled for you?
Our SEO services start with a full audit and a written plan, followed by a monthly report that shows what changed and why.
See our SEO servicesWhat Does x-default Mean?
x-default marks the page to show when no other version matches the user’s language or region. Typical choices are a global English page, or a page where users choose their country and language.
It is optional and recommended. Without it, search engines decide which version unmatched users see.
Do You Need Hreflang for One Language in Several Countries?
Only if you have separate pages for those countries. If one English page serves everyone, there is nothing to annotate.
If you run separate pages for, say, the UK, the US and Australia, hreflang tells search engines which to show where. Without it, they may treat the pages as duplicates and show one everywhere.
Make the regional pages genuinely different where it matters: currency, prices, spelling, delivery, legal terms and contact details. Add a general “en” version as a catch-all for English speakers elsewhere.
What Are Return Links?
A return link is the reciprocal annotation. If the English page lists the French page as an alternate, the French page must list the English page.
Google is explicit: if two pages do not both point to each other, the tags will be ignored.
The complete set must appear on every version:
| On this page | Must list |
|---|---|
| English | en, fr, ar, x-default |
| French | en, fr, ar, x-default |
| Arabic | en, fr, ar, x-default |
Each page includes itself. Adding a new language means updating every existing version.
How Does Hreflang Work with Canonical Tags?
Each language version should have a canonical pointing to itself.
- Do not canonicalise all languages to one version. That tells search engines the others are duplicates, and hreflang is then ignored.
- Hreflang URLs must be canonical URLs. Do not point hreflang at a page that redirects or canonicalises elsewhere.
- Do not noindex a version you list in hreflang.
See our guide to canonical tags.
Which Site Structure Suits Multiple Languages?
| Structure | Example | Advantages | Drawbacks |
|---|---|---|---|
| Subdirectories | example.com/fr/ | One domain to build; simple | Less clear geotargeting |
| Subdomains | fr.example.com | Separable hosting | More to manage |
| Country domains | example.fr | Clear to users; strong local signal | Costly; each domain builds its own strength |
| URL parameters | example.com?lang=fr | Easy to implement | Not recommended |
Hreflang works with all of them, including across domains. Subdirectories suit most businesses.
Do not redirect users automatically by IP address or browser language. It can hide versions from crawlers. Offer a visible switcher.
How Do You Debug Hreflang Errors?
| Error | Cause | Fix |
|---|---|---|
| No return tags | A listed page does not list this one back | Make sets identical on every version |
| Invalid language code | Wrong format, such as “en-UK” | Use ISO codes |
| Missing self-reference | The page does not list itself | Add it |
| Hreflang to a non-canonical URL | Target redirects or has another canonical | Point to the final canonical URL |
| Relative URLs | Missing protocol and host | Use full URLs |
| Hreflang to noindex or blocked pages | Target cannot be indexed | Remove, or make indexable |
| Conflicting methods | Different annotations in HTML and sitemap | Use one method |
| Mixed HTTP and HTTPS | Protocol mismatch | Match the live URL exactly |
How to check:
- Crawl the site with a crawler that validates hreflang. See our guide to using an SEO crawler.
- View the source of sample pages in each language.
- Use the URL Inspection tool to confirm each version is indexed with its own canonical.
- Search from each target country, or check the Performance report filtered by country, to see which version appears.
- Re-crawl after every release.
What Else Does International SEO Need?
Hreflang is one part.
- Real translation and localisation, by native speakers.
- Keyword research per market.
- Local signals: currency, addresses, phone numbers.
- Local links and mentions.
- Fast loading in each region.
- Translated metadata, URLs where appropriate, and structured data.
For language-specific guidance, see our guides to Arabic SEO, Baidu SEO and Yandex SEO.
Frequently Asked Questions
Where do hreflang tags go?
In one of three places: link elements in the HTML head of each page, HTTP Link headers, or entries in an XML sitemap. Google treats the three as equivalent. Choose one method and use it consistently. Sitemaps suit large sites; head tags suit small ones.
What does x-default mean?
It identifies the fallback page for users whose language or region matches none of your listed versions. It is usually a global page or a language selector. It is optional but recommended, since without it search engines choose which version those users see.
Do I need hreflang for one language in several countries?
Only if you have separate pages for those countries. A single page serving all English speakers needs no hreflang. Separate UK, US and Australian pages do, so search engines show the right one in each country instead of treating them as duplicates.
Does hreflang improve rankings?
No. Hreflang does not raise a page’s position. It helps search engines show the most suitable language or regional version to each user. The benefit is that searchers land on a page in their language with the right prices and details, which improves their experience.
Why is Google ignoring my hreflang tags?
The usual causes are missing return links, invalid language or region codes, annotations pointing to URLs that redirect or are not canonical, or pages that all canonicalise to one version. Check that every version lists every other version and itself, with exact, full URLs.
Related Guides
Want this done for you?
See what each monthly plan includes, or send us your site and questions on WhatsApp. We do not promise rankings; we show the work and the data every month.
View SEO packages Chat on WhatsAppSources

