Decoding Search Console: Why Your Shopify Products Have Two URLs (And What to Do About It)
Hey store owners! Ever noticed your Shopify product pages appearing with two different URLs in Google Search Console? One clean (/products/handle) and a longer, collection-specific one (/collections/collection/products/handle). This is a common sight, often confusing, but we've got a clear picture from our community discussions.
Why Two URLs Appear for the Same Product
Why does this happen? Shopify themes, especially older or customized ones, often generate collection-aware links. When a customer clicks a product from a collection page, the URL includes the collection path. For instance, a 'Blue Mug' might have /products/blue-mug as its primary, but /collections/kitchen-gadgets/products/blue-mug when accessed via a collection. A product in multiple collections can thus have several such URLs.
When "Alternate Page with Proper Canonical Tag" is Actually Good News
Here’s the crucial bit: for most of you, this isn’t an error! Shopify is smart. It automatically adds a canonical tag to those collection-path URLs, hinting to Google that the *real*, primary version is /products/blue-mug. In Search Console, you'll typically see these under 'Alternate page with proper canonical tag.' This means Google understood your hint, followed it, and correctly indexed your main /products/handle URL. Phew! Nothing broken, just Google doing its job.
When to Pay Attention: "Duplicate, Google Chose Different Canonical Than User"
However, pay attention if Search Console reports 'Duplicate, Google chose different canonical than user.' This is a red flag. It means Google ignored your canonical hint, usually due to conflicting internal links, inconsistent on-page content, or your Product schema url. If you see this, investigate immediately.
Why Tidy Up Internal Links (Even if Nothing's Broken)
Even if your URLs are 'Alternate page with proper canonical tag,' internal linking cleanup is still wise. It’s about tidying your store for efficiency and consistency.
Firstly, entity consistency: All internal links, sitemap, and Product schema should agree on one definitive URL for each product – ideally /products/handle. Mixed signals, even with canonical tags, make Google work harder.
Secondly, crawl budget: For large catalogs, Google spending time crawling collection-path URLs it won't index adds up. Cleaning these links means Google can spend its valuable crawl time more effectively on your canonical pages.
How to Clean Up Your Shopify Product URLs
So, how do you tidy things up? Here's a practical guide based on expert advice:
- Verify Your Canonical Tag First: Before editing links, confirm your theme correctly outputs the canonical tag. Search your
theme.liquidfor{{ canonical_url }}in the. Ensure no duplicate canonical tags exist. Load a product URL with a variant (e.g.,/products/handle?variant=12345) and check its page source: the canonical should still point to the base/products/handle. Fix this first if incorrect. - Pinpoint the "Within Filter": The common culprit is
product.url | within: collection, often in product card snippets, generating collection-aware URLs. - Locate and Edit Snippets:
- For current themes (like Dawn), check
snippets/card-product.liquid. - For older themes, it might be
snippets/product-grid-item.liquid.
{{ product.url | within: collection }}to simply{{ product.url }}. This makes product cards link directly to the clean/products/handleURL. - For current themes (like Dawn), check
- Look Beyond the Main Grid: This is crucial! Search your *entire* theme code for
within: collection. Check featured collections, recommendations, search widgets, review widgets, and any hand-coded links. - Test Thoroughly: After changes, spot-check 5-10 products from different collections. Hover over their product cards – the link (href) should no longer contain
/collections/.... Click through and confirm the URL in your browser's address bar is the clean/products/handle. Re-confirm the canonical tag in the page source. - Document Customizations: Make a note of any fixes in custom sections, as theme updates won’t affect these.
What NOT to Do
A quick but important note on what *not* to do: Resist adding noindex rules or aggressive redirects for collection-path URLs if Search Console shows them as 'Alternate page with proper canonical tag.' Shopify’s canonical handling is usually sufficient. Google might continue reporting old URLs for a while, so patience is key.
Ultimately, if your Search Console report consistently shows 'Alternate page with proper canonical tag,' and your /products/... URLs are getting impressions and traffic, you're in a good spot. Cleaning up internal links improves signal clarity for Google, makes things more efficient for crawlers, and ensures entity consistency. It's not about putting out a fire; it's about fine-tuning your SEO for long-term health. Keep an eye on your indexed page count and crawl stats. A strong foundation on a platform like Shopify, combined with these SEO best practices, can make a huge difference.