How to Set a Canonical Tag on Shopify
Published · Updated
A canonical tag tells Google which URL is the main version of a page when the same content can be reached at more than one address, for example with tracking parameters or with and without www. Without it, Google may split ranking signals between the copies.
The fix on Shopify
Shopify sets canonical tags automatically for products and pages. If using a custom domain setup with duplicate content, check with your theme developer.
Builder menus change over time. If a label looks different, look for the closest option and check Shopify's help centre.
What this usually looks like on Shopify
Shopify sets canonical tags automatically in its theme code, and for products it points them at the main /products/ address even when the visitor arrived through a collection. So the canonical itself is usually right. The duplicate-address problem on Shopify sits elsewhere: the collection-scoped product addresses still load, many themes link to them, and filtered, sorted and paginated collection pages create further variants.
What to know about Shopify
Canonical tags on product pages
Mostly handled
Points to the /products/ version of every item, but doesn't stop Google from crawling the collection-scoped version if your internal links point there.
Duplicate product URLs via collection-scoped paths
Partially, needs internal link cleanup
Every product has two working URLs with identical content. The automatic canonical tag helps but doesn't stop Google crawling both, or fix internal links pointing to the wrong one.
Why this matters
Most site builders handle this automatically. Without it, if the same content is reachable from more than one URL, Google may split ranking credit between them instead of giving it all to one strong page.
Common mistakes on Shopify
Linking internally to collection-scoped product URLs
A product reached from a collection page can carry an address like /collections/shoes/products/trail-runner. The canonical points back to /products/trail-runner, but if your menus and grids link to the longer one, you are sending mixed signals. Check which version your theme links to.
Hard-coding the canonical in the theme
The canonical in the theme is built from the page itself using Shopify's canonical_url value. Replacing it with a fixed address or a hand-built string can break it on every page of that type. If you edit theme code, keep that value.
A second canonical from an app
Some SEO and marketing apps inject their own head tags. View the source and make sure there is exactly one rel="canonical".
Choosing the wrong primary domain
Canonicals are built from your primary domain. Check in the domain settings that the version you want, with or without www, is the primary one.
How to check it worked
- View the page source (Ctrl+U, or Cmd+Option+U on a Mac) and search for rel="canonical".
- In Search Console, URL Inspection shows the user-declared canonical and the one Google actually selected. If they differ, Google disagrees with your choice.
Open a product from a collection page and note the address. View the source and confirm the canonical points at the main /products/ address. Repeat on page 2 of a collection and on a filtered collection page. In Search Console, URL Inspection on a collection-scoped product address should show the main product address as the Google-selected canonical. If Google keeps selecting the longer version, change what your theme links to instead of trying to override the tag.
Common questions
Does Shopify add canonical tags automatically?
Most builders add them by default. Check the notes on this page for what is and is not handled on this platform.
What should a canonical tag point to?
The full preferred URL of the page itself, including https. It should be a page that loads normally and is not blocked from Google.
Do collection-scoped product URLs hurt my SEO?
Not by themselves, because the canonical tag points back to the main product address. The risk is mixed signals. If your menus, collection grids and other links lean toward a different version, Google may choose an address you did not intend. Linking consistently to the main /products/ address removes the doubt.
Same fix on other builders
More fixes for Shopify