No hreflang tag for home market (possibly since new Markets introduction)

Topic summary

A Shopify store owner discovered that the en-GB hreflang tag for their UK home market disappeared around July, leaving only x-default and tags for other markets (de-DE, en-DE, en-US). This is causing Google to display incorrect country versions in UK search results.

Root cause identified:
Shopify auto-generates hreflang tags based on Markets and Languages configuration. The missing en-GB tag indicates the UK market isn’t using the “English (United Kingdom)” locale specifically.

Recommended solution:

  • Navigate to Markets → United Kingdom market
  • Verify root domain (www.domain.com) is assigned to UK market (not International)
  • Add “English (United Kingdom)” (en-GB) as a distinct language and set as default for UK market
  • Ensure other markets retain their published languages (en-US, de-DE, etc.)

Current blocker:
The store owner reports seeing only generic “English” in their Languages settings with no option to add “English (United Kingdom)” as a separate locale. They’ve shared screenshots showing their current configuration.

Status: Awaiting further guidance on how to add the en-GB locale variant within Shopify’s interface.

Summarized with AI on October 23. AI used: claude-sonnet-4-5-20250929.

Hi all,

I have noticed more and more lately that Google is displaying the wrong country versions of URLs in search results for our home market which is the United Kingdom. Upon closer inspection, there used to be an en-GB hreflang tag in addition to the x-default tag, which for some reason no longer exists. Prior to around July, it looked like this:

<link rel="alternate" hreflang="x-default" href="https://www.domain.com/">
<link rel="alternate" hreflang="de-DE" href="https://www.domain.com/de-de">
<link rel="alternate" hreflang="en-DE" href="https://www.domain.com/en-de">
<link rel="alternate" hreflang="en-US" href="https://www.domain.com/en-us">
<link rel="alternate" hreflang="en-GB" href="https://www.domain.com/">

Today it looks like this (no en-GB):

<link rel="alternate" hreflang="x-default" href="https://www.domain.com/">
<link rel="alternate" hreflang="de-DE" href="https://www.domain.com/de-de">
<link rel="alternate" hreflang="en-DE" href="https://www.domain.com/en-de">
<link rel="alternate" hreflang="en-US" href="https://www.domain.com/en-us">

These are being generated automatically by Shopify. Does anyone know how to resolve this?

Thanks in advance!

Hi @Sebastian_Young

I do not see any URL that is attached in your post, can you provide me with the URL again? :sweat_smile:

Hi @PieLab , oops, sorry about that, the editor had made it HTML so it became invisible. :joy:

Hopefully you can see it now?

Thanks in advance.

Ah, this usually points to a configuration issue.

First, the most common cause is an incorrect primary market setup. Go back to Settings > Markets and double-check that your home country is explicitly set as the “Primary market” and that your main domain is assigned directly to this specific market (not just an international one).

If your market settings are correct, the issue might be with your theme code. Make sure the line {{ content_for_header }} is present in your theme.liquid file and remove any manually added hreflang tags you find elsewhere in your theme. Also, check if your theme has any available updates.

Finally, rule out caching by checking your site in an incognito window or using Google’s Rich Results Test to see the code Google sees.

Hope this helps!

Hi @PieLab, {{ content_for_header }} is definitely in place (because I’m seeing the rest of the stuff!). It’s the same in incognito. I can’t see in new Markets (which isn’t in Settings anymore) how to set a market as primary. Any ideas?

Hey @Sebastian_Young :waving_hand:

Shopify outputs <link rel="alternate" hreflang="…"> from your Markets + Languages setup. If en-GB disappeared, it’s almost always because the UK market is no longer using the “English (United Kingdom)” locale, or the UK market/domain assignment changed.

What to check (and fix)

  1. Markets → United Kingdom (your home market)

    • Domains: make sure the root domain (e.g., www.domain.com) is assigned to the UK market, not to a catch-all/International market.

    • Languages: click Languages and make sure “English (United Kingdom)” (en-GB) is added and published. If it shows just “English” (en), add English (United Kingdom) and set it as the default for the UK market.

  2. Other markets

    • Keep “en-US”, “de-DE”, etc. published under their respective markets.

    • If you’re using one English language for multiple markets, Shopify may collapse hreflang output and stop emitting en-GB. Give the UK its own en-GB language.

  3. Re-test the HTML

    • After saving, open your homepage → View source → search for hreflang="en-GB".

    • Also check a couple of product pages.

  4. Search Console

    • Inspect the URL in GSC and “Test Live URL” to see current tags.

    • Request indexing for the homepage and a few key pages once en-GB appears again.

Why it changed

A recent change to Markets/language publishing (e.g., setting English to en instead of en-GB, or reassigning the primary domain to “International”) can cause Shopify to stop emitting en-GB and only output x-default. Google then has less regional guidance and may surface the wrong locale.

Temporary band-aid (only if you can’t change Markets)

You can add en-GB back for the current page until Markets are fixed:

{%- if request.locale.iso_code != 'en-GB' and localization.available_languages | map: 'iso_code' | join: ',' contains 'en-GB' -%}
  <link rel="alternate" hreflang="en-GB" href="{{ request.origin }}{{ request.path | split: '/' | first == '' ? request.path : request.path }}">
{%- endif -%}

…but the proper fix is correcting Markets → Languages so Shopify emits the full, consistent hreflang set automatically.

If you share a screenshot of Settings → Markets → United Kingdom → Languages & Domains, I can point to the exact toggle you need to flip. :hammer_and_wrench: You can check out our Shopify Partner profile — we’ve built and shared several free Shopify app solutions to help store owners. Feel free to explore our profile and see how our apps can make your Shopify experience better!

Hi @friends2a-technology, thanks for this incredibly detailed and helpful reply!

Our root domain is definitely assigned to the GB market. The issue is possibly the language. Under Languages is:
2.

If I try to add a language, I am taken to Settings → Languages where I see this:

If I try to add a language there are no other options for English.