Selling into several countries is exciting, until a customer in Germany lands on your English page, or a UK visitor sees prices meant for the United States. Search engines try to show the right version of a page to each person, but they need help. On multilingual and multi-regional websites, that help comes from clear site structure and a set of annotations called hreflang.
First, decide your structure
Before touching any tags, choose how language and regional versions will be organised. The main options are:
- Country domains, such as a separate domain per country. Strong local signal, but more domains to manage and build authority for.
- Subfolders, such as /de/ and /fr/ on one domain. Simple to manage and they share the main domain's strength. A popular choice for growing businesses.
- Subdomains, such as de.example.com. Workable, though often treated more like separate sites.
Avoid relying on URL parameters or automatic language switching based on visitor location without giving users a choice. Crawlers usually visit from one location and may never see your other versions.
What hreflang actually does
Hreflang is an annotation that says: "This page has equivalents in other languages or regions, and here they are." It does not boost rankings directly. It helps search engines swap in the right version for each searcher, so a French speaker sees the French page in results rather than the English one.
Each annotation pairs a URL with a language code, optionally followed by a region code. Language codes follow ISO 639-1, such as "en", "fr" or "de". Region codes follow ISO 3166-1, such as "GB", "US" or "CA". So you might mark one page as English for the UK and another as English for Canada.
The three rules that matter most
Every version lists every version
If you have English, French and Spanish pages, each one must reference all three, including itself. This self-reference is often forgotten.
Links must be reciprocal
If the English page points to the French page, the French page must point back. One-way annotations are ignored.
Include a default
An "x-default" entry tells search engines which page to show when no version matches the searcher's language, often a language selector or your main international page.
Where to put the annotations
You can add hreflang in three places, and you should pick just one:
- In the page head, as link elements. Common on smaller sites and supported by many CMS plugins.
- In the XML sitemap, which keeps page code clean and suits larger sites.
- In HTTP headers, mainly for non-HTML files such as PDFs.
WordPress multilingual plugins and Shopify's market features can generate these automatically, but check the output. On a custom-built site, developers should generate them from the same data that defines your translations.
Common mistakes
- Wrong codes, such as using "UK" instead of "GB" for the United Kingdom.
- Pointing hreflang at redirected, noindexed or broken URLs.
- Canonical tags that point all language versions to the English page, which cancels out hreflang.
- Machine-translated pages left unedited, which look low quality to readers and search engines alike.
- Forcing redirects by visitor IP so people cannot reach the version they actually want.
Translation is more than words
Hreflang only helps if each version is genuinely useful to its audience. That means local currency, measurements, contact details and examples, not just translated sentences. Keyword research should be done per language, because people in different markets often describe the same service in different terms. A professional translator or native editor is worth the investment for key pages.
Checking your setup
Crawl your site with a tool that reports hreflang errors, such as missing return links or invalid codes. Use Search Console's URL Inspection to see which canonical Google has chosen for each version. Watch performance by country to confirm the right pages appear in each market.
FAQ
Do I need hreflang if my site has only one language?
No. Hreflang is only for sites with multiple language or regional versions of the same content.
Can I use hreflang for pages in the same language for different countries?
Yes. That is a common use, for example separate English pages for the UK, US and Australia with different pricing or spelling.
Does hreflang stop duplicate content problems between regional versions?
It helps search engines understand that similar pages serve different audiences, which reduces confusion. Differentiating the content where it matters still helps.
Next step
Planning to expand into new markets? Export Apps builds multilingual websites with clean structures and correctly generated hreflang. Contact us to talk through your international plans.