Shopify's automatic hreflang tags: keep them or turn them off
Shopify can add hreflang tags to your store for you. Whether to keep them depends on one thing: whether anything else on your store adds hreflang tags too. Here is what Shopify's tags print, what we found when we tested them, and how to decide.
Where the setting is
In your Shopify admin, open Online Store > Preferences. Under Social sharing image and SEO there's a switch called Automatic hreflang tags. When it's on, Shopify adds a set of hreflang tags to your pages, built from your markets and languages.
Turning it off asks for confirmation, with a warning worth reading: search engines won't be able to show buyers the right regional or language version unless your theme, an app, or another integration adds hreflang tags. Turn it off only when something else does that job.
What they printed on our test store
We switched the setting on for a few minutes on our test store and read the raw HTML of 14 pages. The store sells in two markets, the United States (English, with French at /fr) and Canada (English and French at /en-ca and /fr-ca). Some products have French URL handles, and one product isn't sold in Canada.
<link rel="alternate" hreflang="x-default" href="https://yourstore.com/products/the-videographer-snowboard"> <link rel="alternate" hreflang="en" href="https://yourstore.com/products/the-videographer-snowboard"> <link rel="alternate" hreflang="fr" href="https://yourstore.com/fr/products/la-planche-du-videaste"> <link rel="alternate" hreflang="en-CA" href="https://yourstore.com/en-ca/products/the-videographer-snowboard"> <link rel="alternate" hreflang="fr-CA" href="https://yourstore.com/fr-ca/products/la-planche-du-videaste">
On that store, Shopify's tags were correct:
- Translated handles: the French alternates pointed at the translated address, not at a redirect.
- Products not sold everywhere: the product that isn't sold in Canada got no Canadian alternates.
- Collections and tag pages got the right alternates in every language.
- x-default pointed at the main market.
For the main market Shopify uses language codes on their own (en, fr) rather than language and region (en-US, fr-US). Both are valid under Google's rules. Shopify also adds tags to search results pages.
We tested one common setup: one store, markets in subfolders, Shopify's own translations. We haven't tested a separate domain per market, subdomains, or translation apps that serve their own language versions. Check those setups on your own pages rather than assuming.
When to keep them on
If nothing else on your store adds hreflang tags, keep Shopify's on. Then check that they say the right thing on your own store: run a few pages, including a translated product and one that isn't sold in every market, through the free hreflang checker. If it finds no problems, there's nothing more to do.
When to turn them off
Turn them off when another source adds hreflang tags. That might be:
- an app that manages hreflang (ours included),
- a snippet in your theme, often added by a developer or a previous app,
- a translation app that prints its own tags.
With two sources on, every page carries two sets of hreflang tags. Even when both sets agree, search engines get the same instructions twice, and if they disagree on any address, the pair can be ignored. Duplicate hreflang tags on Shopify covers how to find where a second set comes from.
How to tell what your store prints
Open a product page, view its source (Ctrl+U on Windows, Option+Command+U on a Mac) and search for hreflang. Count the tags for one language. If hreflang="fr" appears more than once, two sources are printing tags. The free checker counts them for you and flags tags from more than one source.
Where our app fits
Hreflang Manager has a free plan that adds no tags: it audits whatever your store prints, including Shopify's automatic tags, against Google's guidelines. If the audit comes back clean, keep Shopify's tags. The paid plan replaces them with its own set, with region codes for your main market as well, and audits your live pages every week. Its setup checklist asks you to turn Shopify's tags off, then confirms that only one set is left.
Sources
- Google Search Central: Tell Google about localized versions of your page.