If your website serves people in more than one language or country, you want each visitor to see the right version in search results: Spanish speakers the Spanish page, UK shoppers prices in pounds, Canadian visitors the Canadian site. International SEO is how you make that happen – and hreflang is its core tool.
Choose a site structure
There are three common ways to organise international content:
| Structure | Example | Pros | Cons |
|---|---|---|---|
| Country-code domains | example.de, example.fr | Strongest country signal, local trust | Expensive, authority split across domains, more maintenance |
| Subdomains | de.example.com | Easy to host separately | Authority partly separated, weaker geo signal |
| Subfolders | example.com/de/ | Shares the main domain’s authority, easiest to maintain | Weaker country signal than a ccTLD |
For most businesses, subfolders offer the best balance: one domain builds authority for every language. Use ccTLDs when you have the resources to run genuinely separate country operations.
Whatever you choose, avoid relying on URL parameters (?lang=fr) or showing different languages on the same URL based on cookies or IP address – search engines need a unique URL for each version.
Language vs country targeting
Decide whether you are targeting languages, countries or both:
- One Spanish version for all Spanish speakers → language targeting (
es) - Different versions for Spain and Mexico → language plus region (
es-ES,es-MX) - One English version but separate pricing for the UK and US → region variants (
en-GB,en-US)
Only create country variants when the content genuinely differs (currency, pricing, legal information, spelling, products). Near-identical copies for every English-speaking country add maintenance without much benefit.
What hreflang does
Hreflang annotations tell search engines that several URLs are equivalent versions of the same content for different languages or regions. They help search engines show the right URL to each searcher – and stop alternate versions being treated as competing duplicates.
<link rel="alternate" hreflang="en" href="https://example.com/">
<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">
Google uses hreflang; Bing relies more on the content-language meta tag and HTML lang attribute, so set those as well.
The rules that matter
1. Every version lists every version – including itself
The full set of hreflang tags should appear on every page in the group. Each page includes a self-referencing entry.
2. Return links are required
If the English page points to the French page, the French page must point back to the English page. Without reciprocal links, Google may ignore the annotations. This is the most common hreflang error.
Validate hreflang tags and confirm each language version links back.
3. Use valid codes
- Language: ISO 639-1 two-letter code (
en,fr,de,ar) - Optional region: ISO 3166-1 alpha-2 code (
GB,US,MX) - Region alone is invalid (
hreflang="uk"means Ukrainian, not United Kingdom) - The UK is
GB: useen-GB, neveren-UK
4. Add x-default
x-default marks the page to show when no other version matches the searcher – typically a language selector or your main international page.
5. Point to canonical, indexable URLs
Every URL in hreflang should return 200, be indexable and be its own canonical. Do not point hreflang at redirects or noindexed pages, and do not canonicalise language versions to each other.
Generate hreflang link tags for every language and region version of a page.
Three ways to implement hreflang
- HTML link tags in the
<head>– easiest for small sites - HTTP headers – for non-HTML files such as PDFs
- XML sitemap – best for large sites, keeps HTML light and is easier to manage centrally
<url>
<loc>https://example.com/fr/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/"/>
<xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/"/>
</url>
Use one method consistently; mixing them makes errors more likely.
Beyond hreflang
- Translate properly. Machine translation without review often reads poorly. Localise currency, units, dates, examples and cultural references.
- Localise metadata. Translate titles, descriptions, alt text and URLs (slugs) where practical.
- Do not auto-redirect by IP. Redirecting visitors based on location can stop Googlebot (which mostly crawls from the US) from seeing other versions. Show a banner suggesting the local version instead.
- Link between versions with a visible language switcher using normal links.
- Set the HTML
langattribute and text direction (dir="rtl"for Arabic and Hebrew). - Earn local links and mentions for each market.
Common hreflang mistakes
- Missing return links
- Invalid codes such as
en-UKorukfor the United Kingdom - Missing self-referencing entries
- Hreflang pointing to redirected, broken or noindexed URLs
- Canonical tags pointing all languages to one version
- Hreflang only on the homepage, not on inner pages
A worked example
A UK-based online shop sells in the UK, Ireland, France and Germany, with English, French and German content. Prices differ between the UK (GBP) and Ireland (EUR).
Structure: subfolders on one domain.
| Version | URL | hreflang |
|---|---|---|
| English – UK | example.com/ | en-GB |
| English – Ireland | example.com/ie/ | en-IE |
| French | example.com/fr/ | fr |
| German | example.com/de/ | de |
| Fallback | example.com/ | x-default |
Every page in each version carries all five annotations. The French and German versions target the language rather than a single country, because the shop serves French and German speakers in several countries with the same content. The UK and Irish versions differ in currency and delivery information, so they get separate regional codes.
Right-to-left languages
Arabic, Hebrew, Persian and Urdu are written right to left. For these versions:
- Set
dir="rtl"on the<html>element along with the correctlang - Mirror the layout – navigation, icons that indicate direction, and text alignment
- Use CSS logical properties (
margin-inline-startinstead ofmargin-left) so one stylesheet works in both directions - Check that numbers, URLs and mixed-language text display correctly
Measuring international performance
In Google Search Console you can filter the Performance report by country and by page, so compare each language folder’s clicks and impressions in its target countries. If French pages get impressions mostly from France but the Belgian and Canadian audiences are missing, consider whether regional variants or local content would help. Also check that searchers in each country are landing on the right version – if UK searchers land on the Irish pages, review your hreflang and content differences.
International SEO checklist
- One unique URL per language or region version
- Site structure chosen (ccTLD, subdomain or subfolder) and used consistently
- Hreflang on every version, including self-references and x-default
- Reciprocal return links between all versions
- Valid language and region codes
- Self-referencing canonicals on every version
- Translated and localised content, titles and descriptions
- HTML
langanddirattributes set - No automatic IP-based redirects; a visible language switcher instead
- Separate performance tracking per market
Key takeaways
- International sites need a unique URL for each language or regional version.
- Subfolders on one domain are the best balance of authority and maintenance for most businesses.
- Hreflang must be reciprocal and include a self-reference on every version.
- Use valid codes – language plus optional region, such as en-GB – and add x-default.
- Each version needs a self-referencing canonical; never canonicalise languages to each other.
- Avoid automatic IP redirects and offer a visible language switcher instead.
Frequently asked questions
Do I need hreflang for a single-language site?
No. Hreflang is only for sites with equivalent content in several languages or regions.
Is hreflang a ranking factor?
No. It does not make pages rank higher; it helps search engines show the right version to the right audience.
Does Google use the HTML lang attribute?
Google detects language from the content itself and uses hreflang for alternates. Setting the lang attribute is still important for accessibility and for other search engines.
Can I translate my site automatically?
You can, but review machine translations. Low-quality automated translation at scale can be treated as low-value content.
Check your own site
Run a free audit with 55+ checks and get a fix for every issue.