Skip to content

Shopify Dude Fix

Shopify Markets Already Adds Hreflang: Don’t Duplicate It in Liquid

Shopify automatically emits hreflang for Markets through content_for_header. Audit theme and SEO-app overrides before adding another set of locale tags.

Quick answer: On a Shopify Liquid storefront using Markets, Shopify automatically outputs market and language hreflang annotations through {{ content_for_header }} in the theme’s <head>. Before adding a Liquid loop or an SEO app that writes alternate links, inspect the rendered page. A second set can conflict with Shopify’s generated URLs and confuse search engines.
On this page

Why older hreflang tutorials can be misleading

Older international SEO guides often show a hand-built loop over country codes, translated handles, and market domains. That may have addressed a specific legacy configuration, but Shopify’s current Markets implementation already manages the annotations for Liquid storefronts. Shopify updates them as market web presences and languages change. A manual list becomes stale when a region switches from a subfolder to a subdomain, or when a translation is unpublished.

Audit the rendered head, not just the theme source

  1. Open a product or collection in the U.S. market and view the rendered HTML source. Search for rel="alternate" and hreflang.
  2. Record the generated locale-to-URL pairs, including region-qualified values such as en-us and fr-ca.
  3. Search layout/theme.liquid, snippets, app embeds, and SEO integrations for extra hreflang output. Keep {{ content_for_header }} in the head.
  4. If two sets disagree, identify the owner of each set. Remove or disable the redundant custom generator only after comparing it with the Shopify-generated URLs on every affected market.
  5. For a headless storefront, don’t assume Shopify inserts tags into your custom frontend; implement alternate URLs in your own rendering layer and verify against the actual route structure.

Example of what to inspect

<link rel="alternate" hreflang="en-us" href="https://example.com/products/sample">
<link rel="alternate" hreflang="fr-ca" href="https://example.com/fr-ca/products/sample">

These are illustrative URLs, not a recommended hard-coded snippet. Compare actual product handles and market URLs. Avoid adding a second hreflang block just because a theme source search cannot find the first: Shopify injects its annotations through content_for_header.

Common misunderstanding: Every country needs a custom Liquid hreflang loop. Shopify’s standard Markets implementation already handles this for Liquid storefronts. Also, a translated language existing in admin does not mean every translated page is live at every regional URL.
How to test this

  1. Capture the HTML source of a U.S. product, a translated market product, a collection, and the homepage.
  2. List every hreflang value and target URL; flag duplicates and conflicting pairs.
  3. Follow each alternate URL and confirm its language, market, canonical, and page identity.
  4. Change a market web presence or language only in a safe test environment; verify Shopify’s generated tags update accordingly.
  5. After removing redundant output, repeat the source audit and monitor Search Console’s international indexing signals.