Shopify Duplicate Product URLs: /collections/.../products/... and Canonical Tags
A Shopify product can be reached at its standard address, /products/your-handle, and also at a collection-based address, /collections/your-collection/products/your-handle. Both show the same page. Shopify adds canonical tags automatically to help search engines treat them as one page, and for most stores that is enough. You can confirm it for your own store in under a minute, as shown below.
Why a product has two URLs
Shopify's Liquid documentation describes a within filter that generates a product URL in the context of a collection. Its own example turns /products/draught-of-immortality into /collections/sale-potions/products/draught-of-immortality. The docs warn that this creates a second URL with the same content as the standard product page, which can affect SEO.
Whether your store links to products this way depends on your theme. If your collection pages link to the collection-based address, shoppers and crawlers will find both versions.
What canonical tags do
A canonical tag is a line in a page's HTML head that tells search engines which URL is the preferred version of that content. Shopify's help center says that auto-generated canonical tags are added to pages to prevent duplicate content from appearing in search results. Shopify's developer docs add that themes can set the tag through the global canonical_url object, which holds the canonical URL for the current page.
Check your own store
- Open a collection page on your live store and click a product. Look at the address bar. If it contains
/collections/before/products/, your theme links this way. - With that product page open, right-click and choose View page source (or press Ctrl+U on Windows, Cmd+Option+U on Mac in Chrome).
- Search the source for
rel="canonical". - Read the
hrefvalue. If it points to the plain/products/your-handleaddress, the duplicate is handled.
If the canonical points somewhere unexpected, or the tag is missing or appears more than once, a theme customization or an installed app may be interfering. Ask whoever maintains your theme to look at the SEO snippet in the theme code. See leftover app code for another reason to review what apps have added.
What not to do
- Do not try to redirect these URLs in the admin. Shopify's URL redirects are meant for old paths that no longer work, as described in fixing 404s with URL redirects. The collection-based address is a working page, so leave it alone.
- Do not delete products or collections to remove duplicates. That creates 404s without fixing anything.
Duplicates that are your own doing
The two-URL behavior is built in, but you can also create real duplicates by copying products. Two separate products with the same title and near-identical text compete with each other, and no canonical tag fixes that. See fixing duplicate product titles and numbered handles like tee-1.
If you have not yet, submit your sitemap to Google Search Console so you can see how Google treats your URLs.
Check the rest of your catalog
The free catalog audit flags duplicate titles and numbered handles across your products, and links each issue to a fix guide.
Check your own store in 20 seconds
The free Catalog Audit for Shopify stores scans up to 1,000 products for empty or thin descriptions, duplicate titles, missing alt text and more, then links each issue to a fix.
Prefer to hand it off? I'm Evan, a software engineer who works on Shopify stores. Leave your email and store URL and I'll reply with a short, prioritized fix list. Free, no obligation.