The UK market inherits the English language from the store default:
What this results in is a hreflang implementation which is missing the “en-gb” that I would expect/want to see referencing the root .com version of the site. All other markets/languages are referenced correctly, and x-default references the .com.
Is there something in the above configuration which is causing this to happen?
Shopify does not produce a hreflang"en-gb" tag even though the UK market is active unless both of these conditions are met:
A distinct domain or subfolder (such as /en-gb) is allocated to the UK market, and
The UK market is specifically designated for the English language.
In your existing configuration:
Since English is the root.com domain’s default language, Shopify handles this as x-default or general en. And as you have pointed out, the UK market lacks a distinct subfolder or domain.
As a result, Shopify ignores that hreflang and does not consider the UK to have a separate language variant (en-gb).
To resolve this, you can assign a unique subfolder or domain to the UK market (e.g., /en-gb), even if it uses the same content as your main .com.
Go to Settings > Markets > United Kingdom
Assign a domain suffix like /en-gb
Assign English to the UK market explicitly (even if it’s the same language)
This will cause Shopify to generate a proper hreflang"en-gb" tag for that version of the site.
Thanks very much for your reply, that is really helpful. However, I have seen websites with an en-gb hreflang instance despite not using a dedicated subfolder for the region, see: www.xposedlondon.com
This is David here. You can hard code the hreflang into your liquid theme should you want to but I believe that creating a subfolder should be more trouble free?