Shopify SEO

Shopify Markets International SEO: The Complete hreflang Setup Guide

Shopify Markets handles currency and routing, but it does not prevent international SEO errors. Missing x-default tags, mismatched hreflang, and unsynchronized sitemaps are the three failure modes that cause a multi-market store to self-compete in Google.

By Aman Bedi, Founder, Obsess AIUpdated 15 min read

Key takeaways

  • 1Shopify Markets automatically generates hreflang tags via the {{ content_for_header }} Liquid tag — but only for stores using Shopify's default theme structure. Customized themes, headless storefronts, and multi-store expansion setups require manual implementation.
  • 2The one tag Shopify Markets never adds automatically is x-default. Every international Shopify store needs a manually added x-default hreflang pointing at the URL you want Google to show when no locale match exists.
  • 3URL structure — subfolder (/en-gb/), subdomain (uk.yourstore.com), or separate domain (yourstore.co.uk) — has lasting SEO consequences. Subfolder is the default in Shopify Markets and the safest choice for most stores building international authority on a single domain.
  • 4hreflang tags must be reciprocal: if your US store points to your UK store, the UK store must point back to the US store. Missing reciprocals are the most common hreflang error and cause Google to ignore the entire tag set.
  • 5Validate your implementation with Screaming Frog (full reciprocal check) and Google Search Console's International Targeting report before assuming hreflang is working correctly.

## The problem with Shopify Markets and international SEO

Shopify Markets is excellent at what it does: routing buyers to the right currency, language, and storefront. What it does not do is guarantee that Google correctly maps your localized pages to the right audience.

Three failure modes show up repeatedly in multi-market Shopify audits:

1. Missing x-default tags. Shopify Markets never adds x-default automatically. Without it, Google has no instruction for what to show buyers in countries you have not explicitly targeted.

2. Unsynchronized sitemaps. When you add a new market, Google needs separate sitemap submissions to know the locale-specific URLs exist.

3. Mismatched hreflang across stores. In multi-store (expansion store) setups, each store needs reciprocal hreflang pointing at the others. When one store is updated and the others are not, the entire tag set becomes invalid.

This guide covers the exact implementation for both single-store Markets and multi-store setups — including the Liquid snippets, sitemap strategy, and validation steps. For shops just getting started, check the Shopify SEO checklist first to confirm your technical foundation is solid before adding the international layer.

---

## How Shopify Markets handles hreflang automatically (and where it falls short)

### What {{ content_for_header }} injects into theme.liquid automatically

Shopify's {{ content_for_header }} Liquid tag — present in the of every standard Shopify theme — injects several blocks of HTML automatically, including hreflang tags when Shopify Markets is active.

For a store with two active markets (US English and UK English), content_for_header injects tags like:

``html

`

This happens on product pages, collection pages, and standard pages automatically — no additional theme code required.

To verify this is working: open a product page in your browser, view the page source (Cmd/Ctrl+U), and search for "hreflang". You should see one tag per active market. If you see none, either content_for_header has been removed from your theme.liquid, or Markets is not correctly configured for that page type.

### The three cases where automatic hreflang breaks

Case 1: Customized or non-standard theme.liquid. If your theme.liquid has been heavily modified — or if your developer replaced {{ content_for_header }} with specific tags rather than the full block — automatic hreflang injection may be disabled. Check your theme.liquid in the code editor (Online Store → Themes → Edit code → layout/theme.liquid) and confirm content_for_header is present in the section.

Case 2: Headless storefronts. If you are using a headless front-end (Hydrogen, Next.js, or custom) that does not use Shopify's Liquid rendering, content_for_header does not apply. You must implement hreflang tags manually in your front-end framework's head component, pulling locale and URL data from the Storefront API.

Case 3: Multi-store expansion store setups. If you are running separate Shopify stores for different markets — a common Shopify Plus pattern — each store renders hreflang only for its own domain. The cross-store reciprocal tags (US store pointing to UK store and vice versa) must be added manually, because no single store knows the URL structure of the other.

### Single-store Markets vs. multi-store expansion stores — which approach to use

Single-store Markets (one Shopify store, multiple Markets configured): Simpler to manage. hreflang is partially automated. Recommended for most merchants expanding to 2–5 international markets without fundamentally different catalog or pricing requirements per market.

Multi-store expansion stores (separate Shopify stores per major region): More control over pricing, inventory, and checkout experience per market. Required for some regulatory environments. Significantly more complex SEO management — each store needs its own hreflang setup, sitemap submissions, and Search Console properties. Recommended only when single-store Markets cannot meet your regional requirements.

The comparison of Shopify's platform architecture against alternatives is covered in our Shopify vs. WooCommerce SEO post.

---

## URL structure decisions that affect international SEO

This decision cannot be undone without a redirect migration. Make it deliberately before activating additional markets.

### Subdomain vs. subfolder vs. separate domain — SEO tradeoffs for each

Subfolder (yourstore.com/en-gb/): The Shopify Markets default. Shares domain authority with your primary store. Easier to manage in a single Shopify store. Google treats subfolders as part of the same site and pools domain authority effectively. This is the right choice for most merchants.

Subdomain (uk.yourstore.com): Supported by Shopify Markets with custom domain assignment per market. Each subdomain is treated somewhat independently by Google — it shares trust signals with the root domain but must build its own topical authority. Use when you have a genuine operational reason (separate checkout, separate legal entity) rather than for SEO.

Separate domain (yourstore.co.uk): Treated as a completely separate site by Google. Requires building domain authority independently. Justified when local market trust signals from a country-code TLD are worth the additional SEO work. Also the pattern used in full expansion store setups.

### How Shopify Markets structures URLs by default

In the default Shopify Markets configuration, locale-specific URLs follow this pattern:

- Primary market (usually US English): yourstore.com/products/[handle]

- Secondary markets: yourstore.com/[locale-code]/products/[handle]

The locale code is the IETF BCP 47 language tag: en-gb for British English, fr for French, de for German, es-mx for Mexican Spanish, and so on.

You can assign a custom domain to a secondary market in Markets → [Market] → Domains. When you do, Shopify automatically reconfigures hreflang to reference the custom domain instead of the subfolder path.

### When to use language-only codes vs. language-region codes

Use language-region codes (e.g., es-MX, es-ES, zh-TW) when:

- You have genuinely different content, pricing, or availability per country

- You are targeting multiple Spanish-speaking or Chinese-speaking markets with distinct storefronts

Use language-only codes (e.g., es, fr, de) when:

- You have one storefront for all speakers of that language regardless of country

- You are not targeting multiple variants of the same language

Do not mix language-only and language-region codes in the same tag set for the same language without an x-default. Google will interpret the ambiguity against you.

---

## Implementing hreflang for Shopify Markets (single store)

### Verifying that Shopify is auto-generating hreflang correctly

1. Enable at least one secondary market in Shopify admin → Markets → Add market

2. Navigate to a product page and view source

3. Search for "hreflang" in the source

4. Confirm you see one tag per active market, with correct locale codes and accurate URLs

If the tags are present and correct, Shopify is handling your hreflang automatically for standard pages. Your remaining tasks are: adding x-default (below) and validating in Search Console.

If the tags are absent, check: Is {{ content_for_header }} present in your theme.liquid ? Is the secondary market published (draft markets do not generate hreflang)? Is the page type a standard Liquid template (custom page templates may behave differently)?

### Adding x-default — the one tag Shopify does not add automatically

x-default tells Google what to show buyers when no locale match exists — typically buyers from countries you have not configured a market for, or users with no detectable locale preference.

Add this manually in theme.liquid, inside the tag, directly after {{ content_for_header }}:

`liquid

{%- comment -%}

x-default hreflang — points to the primary/default store URL.

Shopify does not add this automatically; it must be added manually.

{%- endcomment -%}

rel="alternate"

hreflang="x-default"

href="{{ canonical_url }}"

/>

`

This uses {{ canonical_url }} which outputs the canonical URL of the current page without locale prefixes — which is typically your primary market URL. If your primary market uses a custom domain, replace {{ canonical_url }} with a hardcoded reference to your primary domain.

### Where to place hreflang in theme.liquid for custom pages

For custom page templates (pages that do not follow the standard Liquid pattern), add the x-default tag in the same location. The auto-generated tags from content_for_header will still cover the other locales; x-default fills the gap.

For pages that should not be indexed in multiple locales (contact pages, login pages, etc.), you can omit hreflang entirely — Google does not require hreflang on every page, only on pages with genuinely localized content.

### Using Liquid conditionals for template-specific hreflang (product, collection, page, article)

If you need different hreflang behavior on different page types — for example, products have full locale coverage but some standalone pages are English-only — use Liquid template conditionals:

`liquid

{% comment %} Only output hreflang for product and collection pages {% endcomment %}

{% if template.name == 'product' or template.name == 'collection' %}

{% endif %}

`

Place this inside the block. The template.name variable returns 'product', 'collection', 'page', 'article', 'blog', 'index', etc.

---

## Implementing hreflang for multi-store expansion setups

### Why each store needs reciprocal hreflang tags pointing to the others

This is the rule that most multi-store implementations get wrong. Google requires that hreflang tags be reciprocal: if Store A (US) declares "my UK equivalent is Store B (UK)," then Store B must also declare "my US equivalent is Store A (US)." If only one store declares the relationship, Google ignores the entire tag set.

In a two-store setup (US + UK):

In Store A (US store) theme.liquid:

`html

`

In Store B (UK store) theme.liquid:

`html

`

Both tag sets are identical. Both stores declare the full set of alternate locales. This is the correct pattern.

### Building hreflang with Liquid object handles across stores

In a multi-store Liquid implementation, you cannot reference product handles from other stores directly. The practical approach:

- Use the product.handle Liquid variable to build the cross-store URL dynamically

- Hardcode the other store's domain

- Add a {% unless %} check if products might not exist in the other store

`liquid

{%- assign us_base = 'https://us.yourstore.com' -%}

{%- assign uk_base = 'https://uk.yourstore.com' -%}

{% if template.name == 'product' %}

href="{{ us_base }}/products/{{ product.handle }}" />

href="{{ uk_base }}/products/{{ product.handle }}" />

href="{{ us_base }}/products/{{ product.handle }}" />

{% elsif template.name == 'collection' %}

href="{{ us_base }}/collections/{{ collection.handle }}" />

href="{{ uk_base }}/collections/{{ collection.handle }}" />

href="{{ us_base }}/collections/{{ collection.handle }}" />

{% endif %}

`

This assumes handles are consistent across stores (a reasonable assumption if both stores are managed from the same product data source).

### Using snippets to keep theme.liquid clean (render tag approach)

For multi-store setups with 3+ stores, the hreflang block becomes long. Move it to a snippet:

1. Create a new snippet file: Snippets → hreflang-tags.liquid

2. Paste the hreflang Liquid block into the snippet

3. In theme.liquid, replace the block with:

`liquid

{% render 'hreflang-tags' %}

`

This keeps theme.liquid readable and lets you update hreflang logic in one place across all template types.

### SKU-based product mapping vs. URL handle mapping

If your multi-store setup uses different URL handles for the same product (e.g., the UK store uses "running-trainers" while the US store uses "running-shoes"), you cannot use the handle-based approach above. You need a mapping layer.

Options:

- Metafield mapping: Store the equivalent product handle from the other store as a metafield on each product. Reference it in the Liquid snippet.

- Manual override: For small catalogs, hardcode the cross-store URL as a product metafield and use that value in the hreflang tag.

- App-based management: Tools like the GWA Hreflang Manager handle this mapping for you — relevant if your catalogs diverge significantly between stores.

Use the Obsess AI hreflang generator to generate the full hreflang tag set for your specific store configuration — it handles the URL structure and locale code decisions and outputs ready-to-paste Liquid snippets.

---

## Sitemap strategy for international Shopify stores

### How Shopify generates sitemaps per locale

A standard Shopify store generates one sitemap at /sitemap.xml. When Shopify Markets is active with secondary markets, Shopify generates locale-specific sitemaps:

- yourstore.com/sitemap.xml — primary market URLs

- yourstore.com/en-gb/sitemap.xml — UK English market URLs

- yourstore.com/fr/sitemap.xml — French market URLs

If you have assigned custom domains to markets, each custom domain has its own sitemap at [custom-domain]/sitemap.xml.

Verify your locale sitemaps exist by navigating to the expected URL paths in your browser. If they return a valid XML sitemap, Shopify is generating them. If they 404, the market may not be fully published.

### Submitting separate locale sitemaps to Google Search Console

This is the step most international merchants skip. Submitting locale-specific sitemaps helps Google crawl your international pages faster and associate them with the correct geo-target.

Steps:

1. Add each locale as a separate property in Search Console. For subfolder-based Markets, add yourstore.com/en-gb/ as a URL prefix property alongside your root domain property.

2. In each property, submit the locale sitemap. Search Console → Sitemaps → Add sitemap → Enter the locale sitemap URL.

3. For custom domain markets, add a separate Search Console property for the custom domain.

Google's International Targeting report only works at the Search Console property level — which is another reason separate properties per locale are worth the setup time.

### How to verify sitemap coverage per market

After submitting, return to Search Console → Sitemaps for each property. The "Discovered URLs" count should match roughly the number of products, collections, and pages in that market. If the count is significantly lower than expected, there may be indexing issues with the locale-specific pages.

You can also validate your sitemaps programmatically using the free ecommerce SEO audit — it checks whether locale-specific URLs in your sitemap are indexable and correctly canonicalized.

---

## Validating your hreflang implementation

### Using Screaming Frog to check reciprocal hreflang tags

Screaming Frog (the desktop crawler) has a dedicated hreflang section that is the most reliable way to check reciprocal coverage at scale:

1. Configuration → Spider → Crawl → hreflang — enable hreflang crawling

2. Crawl your primary domain

3. Go to hreflang → All hreflang in the results tab

4. Look for the "Missing Reciprocal" column — any URL flagged here has a broken hreflang relationship

The free version of Screaming Frog crawls up to 500 URLs. For larger stores, you will need the paid version (£259/year) or a similar crawling tool.

Common findings in this audit:

- Pages present in hreflang tags but not crawlable (404, noindex, or blocked by robots.txt)

- Hreflang pointing to non-canonical URLs (URLs with query strings that are not the canonical version)

- Missing reciprocals on recently added products that were not in the theme snippet when it was written

### Google Search Console international targeting report

In Search Console, go to Legacy tools and reports → International Targeting. This report shows:

- Language tab — detected hreflang tags across your indexed pages

- Country tab — whether your site is targeting a specific country via Search Console's geo-targeting setting (for ccTLD domains) or hreflang

The Language tab will show "No significant hreflang usage detected" if your implementation is missing or incorrectly structured. When hreflang is working correctly, you will see a count of detected languages and a summary of any errors.

Note: Search Console's International Targeting report uses sampled data, not full coverage. Use Screaming Frog for definitive page-by-page validation.

### Common errors: missing reciprocals, wrong locale codes, x-default pointing at wrong URL

Missing reciprocals: Every hreflang relationship must go both ways. The most common cause is updating one store in a multi-store setup without updating the others. Fix: establish a deployment checklist that includes hreflang snippet verification in all stores whenever theme.liquid is updated.

Wrong locale codes: Using "uk" instead of "en-gb" for British English is a common mistake. The correct IETF BCP 47 codes for frequently targeted markets:

- British English: en-GB

- Australian English: en-AU

- Canadian English: en-CA

- Canadian French: fr-CA

- Mexican Spanish: es-MX

- Brazilian Portuguese: pt-BR

x-default pointing at wrong URL: If your x-default points to a locale-specific URL (e.g., /en-us/`) rather than the root domain URL, Google may interpret it as another locale-specific tag rather than a true default. x-default should point to the non-locale URL — the page Google shows when it cannot determine the user's locale preference.

---

## Shopify apps for hreflang management (when manual implementation doesn't scale)

### When to use an app vs. code it yourself

Manual Liquid implementation is the right approach when:

- You have fewer than 3 markets

- Your catalog handles are consistent across stores

- You have a developer who can maintain the theme code

An app makes sense when:

- You have 4+ markets with different URL patterns

- Your product catalogs diverge between stores (different handles or different product availability)

- You do not have developer resources to maintain Liquid snippets as markets are added or removed

- You need ongoing validation and error alerting, not just a one-time setup

Comparing app-based hreflang solutions alongside broader SEO app options is covered in our Smart SEO comparison.

### App options compared

GWA Hreflang Manager — Purpose-built for multi-store hreflang management. Handles cross-store URL mapping, generates sitemap annotations, and provides a validation dashboard. The right tool for Shopify Plus merchants running 3+ expansion stores.

Digital Darts — Offers hreflang and international SEO services including both app and managed service tiers. More hands-on than a self-serve app; appropriate for merchants who want expert oversight of their international SEO configuration rather than DIY tools.

Smart SEO — Includes hreflang as part of a broader meta tag automation suite. Appropriate if you need hreflang plus bulk meta tag management across a large international catalog. Not as specialized as GWA for complex multi-store setups.

For straightforward hreflang tag generation — particularly if you need to generate the tag set and paste it into your theme yourself — the Obsess AI hreflang generator is the fastest starting point. Input your store URLs and target locales, and it outputs the complete Liquid snippet and validates your locale codes.

---

## Where to go from here

The implementation checklist for a new international market on Shopify:

1. Enable the market in Shopify admin → Markets and configure the URL structure (subfolder recommended for most stores)

2. Verify auto-generated hreflang by viewing source on a product page and searching for "hreflang"

3. Add x-default manually in theme.liquid using the snippet above

4. Submit locale sitemaps to Google Search Console under a separate property per locale

5. Crawl with Screaming Frog to verify reciprocal coverage before announcing the market

6. Check International Targeting in Search Console after Google has re-crawled (allow 2–4 weeks)

7. Run a full international SEO audit with the free audit tool to catch edge cases

For the tag generation step, the Obsess AI hreflang generator handles locale code validation, x-default placement, and Liquid snippet output — it pairs directly with the implementation steps in this guide.

The technical setup matters, but do not lose sight of what hreflang is actually for: making sure Google shows the right version of your store to the right buyer. Get the implementation right, validate it, and the organic traffic benefits follow.

Frequently Asked Questions

Does Shopify Markets automatically handle hreflang for translated content?

Partially. When you use Shopify's Translate & Adapt app or a third-party translation app alongside Shopify Markets, hreflang tags are generated for locale-specific URLs via {{ content_for_header }}. However, x-default is never added automatically, and any customization to theme.liquid that removes or overrides content_for_header will break automatic hreflang generation. Always verify by viewing page source and searching for "hreflang" after enabling translations.

What happens if hreflang tags are missing on product pages?

Without hreflang, Google decides on its own which version of a page to show to which country audience. This often means your English-US store appears in UK, Australian, or Canadian searches when you have locale-specific versions that would convert better. It can also cause Google to see your locale-specific pages as near-duplicate content, suppressing all versions. The practical result is weaker rankings and lower conversion rates in non-primary markets.

Can I use hreflang without Shopify Markets?

Yes. hreflang is an HTML tag convention, not a Shopify Markets feature. If you serve multiple languages from the same store without Markets — using a third-party translation app, for example — you can add hreflang tags manually in theme.liquid. You will need to write the Liquid conditionals yourself to output the correct href values per locale. The Obsess AI hreflang generator at /tools/hreflang-generator can produce the tag set for you to paste into your theme.

How do I handle hreflang for /collections/all URLs?

The /collections/all URL is a special case in Shopify — it is a system-generated collection page that aggregates all products. In Shopify Markets, the localized version appears at /en-gb/collections/all (or your locale prefix). Apply hreflang to it using the same Liquid snippet you use for standard collection pages. If you have blocked /collections/all in robots.txt (a common recommendation), you can omit hreflang for it — robots.txt-blocked pages should not be included in hreflang tag sets.

What is the difference between language-only codes and language-region codes in hreflang?

A language-only code like hreflang="es" tells Google to show this page to Spanish speakers regardless of country. A language-region code like hreflang="es-MX" targets Mexican Spanish speakers specifically. Use language-region codes when you have genuinely different content per country (different prices, inventory, or copy). Use language-only codes when you serve the same content to all speakers of that language regardless of country. Mixing the two in the same tag set without an x-default creates ambiguity that Google may resolve unpredictably.

How long does it take for hreflang changes to take effect in Google?

Typically 2–6 weeks for Google to re-crawl the affected pages and update its geo-targeting signals. The International Targeting report in Google Search Console will show detected hreflang tags but may not reflect ranking changes for several weeks after implementation. Accelerate this by submitting updated sitemaps for each locale immediately after implementation.

ShopifySEOInternational SEOhreflangShopify Markets
Share:

Sources & references

Primary documentation referenced for the technical claims on this page. We do not link out to competitor products or affiliate content; these are the standards bodies and platform docs the guidance is built against.

Ready to Automate Your Content Marketing?

Let Obsess AI write SEO-optimized blog posts for your Shopify store.