Hreflang is a small piece of code that tells Google which version of a page to show to people in each language or country. For a UK online shop selling abroad, it is how you make sure shoppers in Ireland see your euro prices, shoppers in the US see your dollar store, and UK shoppers keep seeing your pounds-sterling pages. Hreflang does not translate anything or raise rankings on its own; it stops your country versions competing with each other. If you are planning or fixing an international set-up, our ecommerce SEO agency can help.
This guide covers the three ways to add hreflang, the right codes (en-gb, not en-uk), x-default, return links, common errors, how Shopify Markets handles it for you, and how to choose between country domains and subfolders. For the business side of selling abroad, such as VAT, shipping and payments, read our guide to cross-border ecommerce from the UK. Technical rules here come from Google Search Central, checked November 2026.
Quick Answer
Hreflang tells Google which language or country version of a page to show. Add it in the HTML head, HTTP headers or your XML sitemap. Use language codes like "en" with optional country codes like "gb" (en-gb, never en-uk). Every version must list itself and all the others. Add x-default as the fallback. Shopify Markets adds hreflang automatically.
In this post
Selling abroad but the wrong pages rank?
We check hreflang, sitemaps and market set-up for UK shops selling into Ireland, Europe and the US. Tell us where you sell.
What hreflang does
Many UK shops end up with several near-identical versions of the same page, such as a UK page in pounds, an Irish page in euros and a US page in dollars. Without guidance, Google may show the wrong one, for example your UK page to a shopper in Dublin.
Hreflang solves this by labelling each version with its language and, optionally, its country, and linking the versions together. Google's guide to telling Google about localised versions of your page explains the rules. Three points are often misunderstood:
- It is a signal, not a redirect. Google uses it to pick which URL to show in results. It does not move visitors.
- It does not detect language. Google says it does not use hreflang or the HTML lang attribute to work out what language a page is in. It reads the content.
- Translated pages are not duplicates. Google says localised versions only count as duplicates if the main content stays untranslated. Pages in the same language for different countries (UK and US English) can look like duplicates, which is exactly where hreflang helps.
en-gb, en-us, en-ie and x-default
An hreflang value is a language code, optionally followed by a country code. Google's guide says the language must be an ISO 639-1 code and the region an ISO 3166-1 Alpha 2 code. You cannot use a country code on its own.
| Value | Means | Typical use for a UK shop |
|---|---|---|
| en-gb | English, United Kingdom | Your main UK store in pounds |
| en-ie | English, Ireland | Irish store in euros |
| en-us | English, United States | US store in dollars |
| en | English, any country | One English version for everywhere not listed separately |
| de-de / fr-fr | German in Germany / French in France | Translated EU stores |
| x-default | Fallback when nothing else matches | A global store or a country selector page |
| en-uk | Wrong: "UK" is not the ISO code | Google says UK, EU and UN have no effect in hreflang. Use en-gb |
The code for the United Kingdom is GB, not UK. It is an easy mistake to make on British sites.
x-default is a reserved value. Google describes it as the version to use when no other language or region matches the user's browser settings. For a UK shop that sells worldwide, x-default often points to the main international store or a country selector.
Three ways to add hreflang
Google says the three methods are equivalent, so pick the one that suits your platform. Using more than one only adds work.
1. HTML link tags in the head
<link rel="alternate" hreflang="en-gb" href="https://www.example.co.uk/candles/" />
<link rel="alternate" hreflang="en-ie" href="https://www.example.co.uk/en-ie/candles/" />
<link rel="alternate" hreflang="en-us" href="https://www.example.co.uk/en-us/candles/" />
<link rel="alternate" hreflang="x-default" href="https://www.example.co.uk/candles/" />The same block goes on all three pages. This is the simplest method for most sites.
2. HTTP headers
For files that have no HTML head, such as PDFs, you can send the same information in a Link HTTP header, for example: Link: <https://www.example.co.uk/guide.pdf>; rel="alternate"; hreflang="en-gb", with one entry per version.
3. XML sitemap
You can list the alternates inside each <url> entry of your sitemap using <xhtml:link rel="alternate" hreflang="…" href="…"/>. This keeps page code clean and suits large sites. If you use this method, read our XML sitemap guide for the size limits and submission steps.
Whichever method you use, Google requires fully qualified URLs, including https://. Relative links such as /en-us/candles/ are not valid in hreflang.
How to set up hreflang, step by step
- Decide your markets. List each country or language you sell to, with its currency, prices, delivery terms and URL.
- Choose the URL structure. Country domains, subfolders or subdomains (see below). Decide this before launch, because changing it later is a migration.
- Map every page to its alternates. For each UK page, note the matching Irish, US or EU page. Pages that do not exist in a market simply have no alternate for it.
- Pick the codes. en-gb for the UK, en-ie for Ireland, en-us for the US, and so on, plus one x-default.
- Add the tags. Use one method: HTML head, HTTP header or sitemap. On Shopify with Markets, this is done for you.
- Make every page list itself and all its alternates. Google says each version must list itself and all other versions, and that tags are ignored when two pages do not point to each other.
- Point only to live, indexable URLs. No redirects, no 404s, no noindex pages. Each version should have a canonical tag pointing to itself. Our canonical tags guide explains why this matters.
- Check it. View the page source on a sample of pages in each market, or use a site crawler that reports hreflang errors, and look for missing return links and invalid codes.
- Add visible country selectors. Google's multi-regional sites guide says geotargeting is not an exact science and suggests letting users switch region and language.
How Shopify Markets handles hreflang
If you sell abroad on Shopify, Shopify Markets does most of the technical work. Shopify's help page on international SEO for markets says, as of November 2026:
- Hreflang is automatic. Tags are generated from your market and language set-up, but only for markets with their own domain, subdomain or subfolder.
- x-default is added. It points to the back-up region's URL in that market's default language.
- Sitemaps include market URLs and only list products available in each market.
- Canonicals are self-referencing for each market version, not pointing to another market.
- Crawlers are not redirected by location, so Google can index every version.
- You can turn automatic hreflang off in Online Store, Preferences, but Shopify warns this can hurt SEO unless you add your own tags.
Shopify's separate hreflang tags page adds a warning: if you add two domains to the same market targeting the same language, search engines may see duplicate content. Give each domain a different language.
Common mistake: Selling to Ireland and the US from a Shopify store with currency switching only, but no market subfolder or domain. Shopify then has no separate URL to tag, so there is nothing for hreflang to point to. If organic search in a country matters, give that market its own subfolder.
ccTLD vs subfolder vs subdomain
International SEO starts with how you structure URLs. Google's multi-regional sites guide compares the options:
| Structure | Example | Pros (Google) | Cons (Google) |
|---|---|---|---|
| Country domain (ccTLD) | example.ie | Clear geotargeting; server location irrelevant; easy separation | Expensive; may have limited availability; one country per domain; some have strict requirements |
| Subdomain | ie.example.com | Easy to set up; different server locations possible | Users may not know if "ie" means language or country |
| Subfolder | example.com/en-ie/ | Easy to set up; low maintenance on one host | One server location; harder to separate sites |
| URL parameter | example.com?loc=ie | None | Not recommended by Google |
Shopify's markets page also recommends subfolders by default and notes that subfolders share the strength of your main domain, while new domains and subdomains start with less SEO value and build their own over time.
For most UK shops starting to sell abroad, subfolders on your main domain are the simplest choice. A separate .ie or .de domain can make sense if you have a strong local team, local stock and a budget to build that site's links and content.
Note on a .co.uk domain: a .co.uk is a UK country domain. If you plan to sell heavily abroad, many brands use a .com for international stores. That is a brand and budget decision as much as an SEO one, and changing domains later needs a careful migration.
Google's guide also warns against redirecting people by IP address, calling IP location analysis difficult and generally unreliable, and advises avoiding automatic redirects between language versions.
Common mistakes
Common mistake: Using en-uk instead of en-gb. Google says "UK" has no effect in hreflang. The correct country code is GB.
Common mistake: Missing return links. If the UK page points to the Irish page but the Irish page does not point back, Google ignores the pair.
Common mistake: Pointing hreflang at URLs that redirect, return 404, are set to noindex, or have a canonical tag pointing to a different version. Each alternate should be a live page with a self-referencing canonical.
Common mistake: Using relative URLs. Google requires full URLs including https://.
Common mistake: Auto-redirecting visitors by IP address. Google advises against it, and it can stop crawlers and shoppers reaching the right version.
Common mistake: Expecting hreflang to make a page rank. It only chooses which of your versions to show. Each market version still needs good content, local prices and, ideally, local links.
When to get help
On Shopify with Markets set up properly, hreflang mostly looks after itself, and your job is to check it. Get help when the wrong country version ranks, when you run a custom or headless site, when you are choosing between domains and subfolders, or when you are moving to an international structure. Our ecommerce SEO service covers international SEO for UK online shops, from £1,500 a month. For a wider technical check, see our technical SEO checklist.
Frequently Asked Questions
What is hreflang?
Hreflang is an attribute that tells Google which language or country version of a page to show to each user. It links equivalent pages, such as a UK page and an Irish page, so they do not compete in search results.
Should I use en-gb or en-uk?
Use en-gb. The ISO country code for the United Kingdom is GB. Google says UK, EU and UN have no effect in hreflang annotations.
What is x-default in hreflang?
x-default is a reserved value for the fallback page Google should show when no other language or region matches the user, often a global store or country selector.
Does Shopify add hreflang automatically?
Yes. With Shopify Markets, hreflang tags are generated automatically for markets that have their own domain, subdomain or subfolder, including an x-default. You can turn this off, but Shopify warns it can hurt SEO.
Is a subfolder or a country domain better for international SEO?
Both can work. Subfolders are easier to set up and share your main domain's strength. Country domains send the clearest local signal but cost more and must build authority from scratch.
Does hreflang improve rankings?
Not directly. It helps Google show the right version of your page in each country. Each version still needs strong content, local pricing and links to rank well.
Planning to sell beyond the UK?
We set up and check international SEO for UK online shops, from market structure to hreflang and sitemaps. Ask us for a quote.

