SEO

How to Fix Shopify's Duplicate Product URL Issue for Better Rankings

On most Shopify stores the same product can be opened at /products/handle and at /collections/name/products/handle. Canonical tags normally tell search engines which one counts, but your own internal links can still undermine that. Here is how to fix it at the source.

By FlowCart Agency · · 6 min read

Why the duplicate URL exists

When a shopper clicks a product from inside a collection, many themes link to a collection-scoped URL so the storefront can show next and previous products within that collection. The product page content is identical to the main one, so you end up with two addresses for one page.

Shopify's default canonical tag points the collection-scoped version at the main /products/ URL, which is the safety net. For background on how canonicals work, see our guide to duplicate content and canonical tags.

Why it still matters if canonicals are set

  • A canonical is a hint. If your internal links, sitemap and canonicals disagree, search engines may choose a URL you did not intend.
  • Internal links pointing to the collection-scoped URL send authority to a page you have told search engines to ignore.
  • Crawl budget is spent on two URLs per product on larger catalogues.
  • Reports in Search Console and analytics get split across two paths, which makes performance harder to read.

The fix: link to the main product URL

In Liquid, themes usually generate the collection-scoped link with the within filter on the product URL. Removing the filter makes the link use the main URL.

  1. Duplicate your live theme so you have a safe copy to edit.
  2. Search the theme code (product cards, collection templates, search results, recommendations, cart) for product.url used together with | within: collection.
  3. Replace that usage with plain product.url so each link points at /products/handle.
  4. Preview a collection and confirm the product links now show the /products/ path.
  5. Publish the theme once you have checked product cards on collection, search, home and recommendation sections.

Editing theme code carries risk and some themes rely on the collection path for their next/previous navigation, so test it on a duplicate first. If you would rather not edit code, our technical SEO audit includes this fix.

How to verify the fix

  1. View the source of a collection page and check the product link hrefs use /products/.
  2. Crawl the site and confirm that internal links to /collections/.../products/... have gone.
  3. Confirm the sitemap lists only /products/ URLs (Shopify does this by default).
  4. In Search Console, watch the Pages report for "Duplicate, Google chose different canonical than user" trending down over the following weeks.

Frequently asked questions

Why does my Shopify product have two URLs?
Themes often link to products through their collection, producing /collections/name/products/handle in addition to the main /products/handle. Both show the same page.
Does the duplicate product URL hurt Shopify SEO?
Shopify's canonical tag normally consolidates the two, so the harm is limited. Inconsistent internal links can still dilute signals and waste crawl budget, so linking to the main URL is cleaner.
Can I remove the /collections/ path from Shopify product URLs?
The page still exists at that path, but you can stop linking to it by removing the within filter in your theme. The canonical tag and sitemap continue to point to the main /products/ URL.

Keep reading