Shopify

Shopify wrong canonical: the theme.liquid tag

Shopify emits canonicals through the theme's canonical_url object. Where the tag comes from, what breaks it, and how to check any page.

Shopify normally outputs the page canonical through the "canonical_url" object in layout/theme.liquid, but hardcoded theme markup or an app can add a wrong or duplicate tag. Replace the hardcoded value with "{{ canonical_url }}", remove the second canonical source, save, and check the live page source again.

Why Shopify does this

On Shopify the theme owns the tag, not a platform setting: the developer docs show the canonical as <link rel="canonical" href="{{ canonical_url }}" /> inside the <head> of layout/theme.liquid, printed from the global Liquid canonical_url object. So when a store's canonical points at the wrong URL, the usual culprit is edited theme code or an app, and Shopify's own docs name the failure mode: "Don't hardcode domains or resource handles." Their hreflang guide adds that the automatic tags "stay in sync with each page's canonical URL", and warns that adding tags on top of the automatic ones "can produce duplicate or conflicting annotations, which can hurt your store's search ranking".

Check it right now

Before changing anything, confirm what a crawler actually sees. The check is free, takes one URL and needs no account.

Run the check

How to fix it

  1. Open the Shopify admin and go to Online Store > Themes.
  2. Click the actions button, then "Edit code".
  3. In the layout folder, open theme.liquid and search for link rel="canonical".
  4. Confirm each canonical prints the canonical_url object rather than a typed-in URL; the developer docs' standard form is <link rel="canonical" href="{{ canonical_url }}" />.
  5. Fix any hardcoded domain or second canonical added by an app or snippet, and click Save.
  6. Re-check the page with the free canonical checker below.

Why it happens again

Theme edits and app installs are routine, and each one can add or move a canonical without anyone diffing the page head afterwards. A redesign or a migration to a new theme is when this bites, and Shopify's own duplicate-annotation warning is the reason a second tag is worse than a wrong one.

stillindexed re-checks the URLs you give it every 30 minutes on Starter and alerts when a directive changes, at most 30 minutes after it does. It is a monitor rather than a crawler: it watches a list you choose and tells you when one of seven things changes. Card first, no trial, and a 30 day refund.

See what monitoring covers

Catching it next time

Fixing it once is the easy half. The setting that caused this can be changed again by anyone with access, and the page will keep returning 200 while it happens.

Other ways Shopify loses pages

A canonical tag pointing at the wrong URL, on other platforms

Sources

Every claim about Shopify above is from their own documentation, read on 2026-08-30. Platforms change their settings; if one of these is out of date, their page wins and we would like to know.