Hreflang for Shopify: The Complete Setup Guide

You've set up a French version, a Canadian version, maybe a German storefront too, all running through Shopify Markets or a translation app. Then Google keeps showing shoppers in Berlin the English-language page, or worse, treats your regional pages as duplicate content and buries all of them. The pages exist. Search engines just don't know how they relate to each other.

That's exactly what hreflang solves, and it's more relevant on Shopify than almost any other platform, since Shopify's own approach to international selling — Markets, domains, subfolders, translation apps — changes how and where the tag actually needs to live.

Quick Answer

Hreflang on Shopify is added either automatically, by Shopify Markets when a store uses separate URLs per market, or manually, by editing theme.liquid or configuring a translation app's SEO settings. Each market page needs a full set of hreflang tags — one per language/region combination, plus a self-reference and an x-default fallback — and the setup should always be checked with Search Console or a dedicated testing tool.

What is hreflang, and why does Shopify complicate it?

Hreflang is an HTML attribute that tells search engines which language and, optionally, which country a page is meant for, and which other URLs are alternate versions of that same page for different audiences. It doesn't translate anything or redirect anyone — it's a signal, not a mechanism.

The technical concept is simple. The Shopify-specific part is figuring out which layer of your setup — Markets, app, or theme — is actually responsible for producing the tags.

Why hreflang matters for Shopify stores specifically

Ecommerce stores selling across borders run into problems that content sites don't, and Shopify's structure makes hreflang more, not less, important:

📊 Quick stat Stores that launch a new Shopify Market without updating hreflang across their existing market pages typically see the new market's pages compete with, rather than complement, the original store in search results for months before anyone notices.

Step-by-step: adding hreflang to a Shopify store

  1. Confirm how your markets are structured. Check Shopify admin under Settings → Markets to see whether each market has its own subfolder, subdomain, or domain, since hreflang only makes sense where URLs actually differ.
  2. Check whether Shopify is already generating hreflang. View the page source of a live market URL and search for hreflang in the <head> — if Markets is using domain-based or subfolder-based URLs, the tags are frequently already there.
  3. If tags are missing, decide where to add them. For most themes this means editing theme.liquid directly; for stores using a translation app, check the app's own SEO or hreflang settings first, since it may already own this part of the head section.
  4. List every market and its correct locale code. Match each market to an ISO language code, adding a region code where the market is country-specific, such as en-gb for the UK market versus a plain en for a language-only market.
  5. Build the full alternate set for each page. Every page needs a link to every other version of itself, including a self-referencing tag for its own URL, plus one x-default entry pointing to the fallback version.
  6. Add the tags to the head section. Whether pasted into theme.liquid or configured through an app, the tags must render inside <head> on every relevant page template, not just the homepage.
  7. Validate every market URL. Run each live market page through Search Console's International Targeting report or a hreflang testing tool to confirm all tags are present, reciprocal, and using valid locale codes.
Try the Rebrixe Hreflang Generator — free List your markets and get a ready-to-paste hreflang tag set.
Generate Hreflang Tags →

Common hreflang mistakes on Shopify

1. Forgetting the self-referencing tag

Every market page needs to include a hreflang entry pointing back to itself, not just links to the other markets — leaving it out is one of the most frequent errors Search Console flags on multi-market Shopify stores.

2. Mixing up language-only and region-specific codes

Using en-en instead of the correct en, or applying a country code to a market that's actually language-only, produces invalid pairs that search engines simply ignore.

3. Letting Markets and an app both try to own hreflang

When a translation app and Shopify Markets both attempt to inject hreflang into the same page, the result is often duplicate or conflicting tags — one of the two should be the single source of truth.

4. Adding a new market without updating existing pages

Hreflang is reciprocal by design — every existing market's tag set needs to be updated to reference a newly added market, not just the new market's own pages.

💡 Pro tip Keep a simple spreadsheet mapping each Shopify Market to its URL pattern and locale code, so adding or auditing a market is a lookup instead of a guess.

Real-world examples

How different Shopify setups end up handling hreflang in practice:

Shopify Markets, subfolders
Domain.com/fr-ca, /en-gb
Mostly automatic
Shopify generates hreflang across subfolder markets on its own, needing only a spot-check after each new market launch.
Shopify Markets, domains
Domain.de, Domain.fr
Setup once, verify often
Separate ccTLDs need their hreflang cross-referencing checked every time a new country domain is added.
Translation app store
App-managed locales
App-owned tags
The app injects its own hreflang for the locales it translates, configured through its SEO settings panel rather than theme.liquid.
Single market, no separate URLs
Currency switcher only
Hreflang not applicable
With one URL serving all visitors, there's no alternate version to point to, so hreflang has nothing to do here yet.

The common thread: hreflang only has work to do once distinct URLs exist for distinct audiences — the setup path just depends on what's generating those URLs.

Shopify hreflang methods compared

A look at the main ways hreflang gets implemented across different Shopify setups.

Method Setup effort Automation Best for
Shopify Markets (subfolders/domains) Low, built into Markets Mostly automatic Stores using Shopify's native international setup
Translation/localization app Moderate, app config needed Depends on the app Stores adding languages without full Markets rollout
Manual theme.liquid edit High, needs careful editing Fully manual Custom setups Markets and apps don't fully cover
Hreflang generator tool Low, form-based output Manual paste, no ongoing sync Building or double-checking a tag set quickly

Generate your hreflang tags right now — free

The Rebrixe Hreflang Generator builds a complete, reciprocal set of hreflang links for every market and locale you enter, including a correctly placed x-default — ready to paste into theme.liquid or hand to whoever manages your Shopify theme.

Free Hreflang Tag Generator Enter your markets and locales, copy the finished tag set.
Open Hreflang Generator →

Frequently asked questions

Only if the store uses Shopify Markets with separate URLs per market (subfolders or domains). In that setup Shopify generates the hreflang tags on its own. Stores using only a translation app, or a single market with multiple languages, usually need the tags added through the theme or the app's settings.
They belong inside the <head> section of every page, which on Shopify means the theme.liquid file, or wherever the app responsible for translations injects its own head markup. They should never be placed in the visible body content.
Use an ISO 639-1 language code on its own for a language-only market, such as en or fr, and add an ISO 3166-1 region code with a hyphen for a country-specific market, such as en-us or fr-ca. Shopify Markets exposes these codes directly in its market settings.
Yes, if the markets use distinct URLs, such as separate subfolders or domains, since hreflang is what tells search engines those URLs are alternate versions of the same page rather than duplicate or competing content.
x-default points to the version of a page shown to visitors whose language or region doesn't match any configured market, such as the store's primary domain. Any Shopify store with more than one market should include it so there is a defined fallback.
View the page source of each market URL and confirm the hreflang links list every market including a self-referencing tag, then run the URLs through a dedicated hreflang testing tool or Google Search Console's International Targeting report to catch mismatches.
Established translation and localization apps typically generate hreflang tags for the locales they manage, but it's worth confirming in the app's SEO settings rather than assuming, since some only handle on-page translation and leave hreflang untouched.

Generate your hreflang tags in seconds

The Rebrixe Hreflang Generator builds a complete, reciprocal hreflang tag set for every market and locale you enter — no account, no watermark, just a ready-to-paste block for theme.liquid.

Launch the Hreflang Generator →
← Back to blogs