fbpx

Linking Category Pages to Canonical Product Pages

By default, Shopify’s product page URL structure is not SEO-friendly. Typically, a product page URL looks like this: /products/name-of-product. However, when you access a product from a collection page, the URL changes to: /collections/name-of-collection/products/name-of-product. You can see this by opening any product from a collection page on your store.

Even though the URL changes, a piece of code called a canonical tag tells search engines that the primary page is still the original /products/name-of-product URL. This can lead to search engines potentially indexing the same product under multiple URLs, inefficiently using your site’s crawl budget—the limited capacity search engines allocate to scanning your site.

While this URL structure may look good and help facilitate breadcrumbs, they aren’t great for SEO. It’s better to change your theme files so all product links go directly to the primary product page URL.

Go to Online Store > Themes > Customize > Edit Code > Snippets > product-grid-item.liquid:

  1. Find the part that says "within: collection" and remove it
  2. Save your changes

After this, all your product links should point directly to the main product page. Just double-check to remove this text from all the places it appears. Sometimes themes have multiple instances or slightly different setups.