Hreflang on Shopify: A Complete Setup and Debug Guide
Rajat Agarwal
May 1, 2026

Hreflang is one of those technical SEO topics that everyone agrees is important and almost no one fully understands. The good news: on Shopify, hreflang is mostly automatic. The bad news: when it breaks, it breaks silently, and the symptoms — German visitors landing on your English page, French visitors seeing the wrong currency — usually take weeks to notice. This guide covers what hreflang actually does on Shopify, how to verify it's working, and how to debug the most common ways it goes wrong.
What Are Hreflang Tags?
Hreflang tags are HTML attributes that tell search engines which version of a page to show users in each language and country. A page with hreflang='de' tells Google 'serve this URL to German-speaking users.' Without hreflang, Google guesses — and the guess is often wrong, especially when your translated pages have very similar layouts and Google can't decide which is the canonical version. Hreflang is how you stop the guessing.
Does Shopify Add Hreflang Tags Automatically?
Yes — if you use Shopify Markets with the built-in Translate & Adapt app, Shopify emits hreflang tags automatically for every published language. Most third-party translation apps (Lokalize, Weglot, GTranslate) do the same. Custom themes can sometimes block or duplicate these tags, which is the most common source of hreflang errors on Shopify. The first thing to verify on any multilingual store is that hreflang is actually rendering on every translated page.
How to Verify Hreflang Is Working on Your Shopify Store
Open one of your translated pages (e.g. yourstore.com/de/products/example) and view the HTML source. Search for 'hreflang.' You should see one tag per published language plus an x-default tag pointing to your primary version. If you don't see any hreflang tags, the most common causes are an outdated theme, a custom theme that strips them, or a translation app that hasn't fully synced. If you see them, but they point to wrong URLs or use wrong language codes, that's a more involved fix.
Common Hreflang Errors on Shopify
Five errors cause most hreflang problems on Shopify. First: missing return tags — every language version must point to every other language version, not just to itself. Second: wrong language codes ('de-DE' when you should be using 'de'; 'gb' when the spec wants 'en-GB'). Third: hreflang tags pointing to URLs that 301-redirect somewhere else. Fourth: duplicate or conflicting tags from a theme that emits its own and an app that also emits its own. Fifth: missing x-default — Google uses x-default for visitors whose language doesn't match any of your published versions.
How to Fix Misconfigured Hreflang Tags
If you're using Translate & Adapt or a third-party translation app, your first move is to disable any hreflang code in your theme — let the app handle it exclusively. Look in your theme's layout files (usually theme.liquid) for any 'hreflang' references and remove them, then re-render and verify. If the app itself isn't emitting hreflang, contact the app vendor — for Lokalize, it's a documented support fix; most reputable apps respond within hours. For custom themes, your theme developer typically needs five minutes to add the standard hreflang block. (Related: if you also see translation missing errors, the fix often touches the same files.)
Hreflang and Shopify Markets: How They Work Together
Shopify Markets is what makes hreflang straightforward on Shopify. Each market you create defines the language and country combinations Shopify needs to emit correct hreflang. If you're running multiple markets on subfolders (yourstore.com/de, yourstore.com/fr), Shopify automatically generates the tags. If you're running on subdomains or ccTLDs, the setup is more involved and is one of the reasons subfolders are recommended for most Shopify merchants.
What Language Codes Should I Use?
Use the simplest valid code for your audience. 'de' targets all German speakers globally; 'de-DE' targets German speakers in Germany specifically; 'de-AT' targets German speakers in Austria. Most merchants under-target by using country-specific codes when language-only codes would work. If you sell the same German page to Germany, Austria, and Switzerland, use 'de' — not three separate tags. Use country-specific codes only when you're actually serving different content per country.
Should I Use x-default?
Yes. The x-default tag tells Google which version to serve to users whose language doesn't match any of your published versions. It's typically your English version or the language of your primary market. Without x-default, Google has to guess for visitors outside your published languages — and the guess is often wrong. Adding x-default is one line and fixes a real edge case.
How Do I Check Hreflang in Google Search Console?
Search Console flags hreflang errors under International Targeting (in the legacy reports) or as soft errors in the indexing reports. Set up Search Console properties for each country you're targeting and watch the indexing report for any 'hreflang' or 'no return tag' errors. Most hreflang errors caught in Search Console are fixable in the translation app or theme — they're rarely Google misreading your tags.

Ready to translate your store?
Lokalize translates your store into 130+ languages with AI. Free to install. Cancel anytime.
Install Lokalize free↗