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.
How to fix it
- Open the Shopify admin and go to Online Store > Themes.
- Click the actions button, then "Edit code".
- In the layout folder, open theme.liquid and search for link rel="canonical".
- 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 }}" />.
- Fix any hardcoded domain or second canonical added by an app or snippet, and click Save.
- 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.
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 page or product is live in the store but missing from Google, or a whole store is invisible after launch.
- my Shopify robots.txt is blocking pages that should be crawled
- my Shopify migration lost pages from search
- A Shopify store reaches its final URL after two hops: one domain redirect from the platform and a second from a manual URL redirect.
- A Shopify storefront shows a connection warning because the automatic TLS certificate is stuck pending or failed.
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.