Shopify Canonical URL Guide: How to Fix Duplicate Content and Improve SEO

Learn how Shopify canonical URLs fix duplicate content, protect rankings, and the quick checks you can run to ensure your store is set up correctly.

Jeff Edmondson

Tuesday, September 30, 2025

Introduction

Search engines don’t just look at the words on your pages they also look at your URLs. On Shopify, the same page can sometimes be reached in more than one way: through a collection, through a variant, or with a tracking link. To a shopper, it’s all the same product. But to Google, those are technically different pages.

That’s where canonical URLs come in. A canonical tag is a small piece of code that tells search engines, “This is the main version of this page.” It keeps your SEO signals in one place and helps make sure the right URL shows up in search results.

The best part? Shopify themes handle this automatically for most stores. Search engines treat them as a suggestion, not a rule and sometimes pick a different URL than the one you’d expect. Plus, in a few edge cases, you may want to step in to make sure your store is sending clear signals.

What is a Canonical URL?

A canonical URL is the version of a page you want search engines to treat as the “official” one. You set it with a tiny piece of code in your page’s <head>:

<link rel="canonical" href="<https://yourstore.com/products/example-product>" />

When Google or Bing crawl your site, this tag is like a signpost: “No matter how you got here, either with a collection path, a variant parameter, or a tracking link, this is the page that counts.”

Canonical URL vs. Canonical Tag

  • Canonical URL = the actual web address you want recognized as the main one.
  • Canonical Tag = the line of HTML code that points to that URL.

For example, if a product page is available at:

  • yourstore.com/collections/sale/products/shirt
  • yourstore.com/products/shirt?variant=123

…the canonical tag would point to the clean URL:

yourstore.com/products/shirt

Search engines treat canonical tags as a hint, not a hard rule. That means Google will usually respect the URL you declare, but if other signals (like redirects, internal links, or your sitemap) point somewhere else, it might choose a different canonical. This is why it’s important to align all your signals, not just rely on the tag alone.

Why Canonical URLs Really Matter for Shopify Stores

1. Protect your rankings from duplicate product URLs

Shopify products can often be reached in multiple ways:

  • yourstore.com/products/red-shirt
  • yourstore.com/collections/sale/products/red-shirt

If both versions end up in Google’s index, they compete against each other. Instead of one strong page ranking well, you could have two weaker pages that split your SEO value, backlinks, product reviews, and authority.

👉 A canonical tag consolidates everything under the clean product URL, giving Google a clear signal and helping your main page rank higher in search results.

2. Protect your SEO pages from ad campaign links

Every time you run a Google Ads or email campaign, Shopify appends tracking parameters like ?utm_source=newsletter. To a shopper, it’s still the same product. But to Google, it’s a brand-new URL.

👉 Without a canonical tag, these campaign URLs can slip into Google’s index and compete against your main SEO page. Canonicals keep your marketing and SEO working together, not against each other.

3. Save crawl budget for the pages that matter

Shopify stores often grow fast. Variants, tags, and filters can balloon into thousands of URLs that all look similar. Search engines only crawl a limited number of pages per site.

👉 Canonical tags tell Google, “These versions are duplicates only focus on the main one.” That way, crawl budget is spent on your new arrivals and bestsellers instead of wasted on URL noise.

Canonical vs Redirects vs Sitemaps vs Internal Links

Canonical tags aren’t the only way to guide search engines. They’re part of a bigger system of signals that all need to align. Here’s how they compare:

1. Canonical Tags (a strong hint)

  • What they do: Suggest which URL should be treated as the main one.
  • When to use: When you need multiple URLs live for customers (e.g., product in multiple collections) but only one should rank.

2. 301 Redirects (a strong command)

  • What they do: Permanently move users and Google from one URL to another. Checkout our app Redirect Ninja for easy Shopify Redirects.
  • When to use: When a page is truly gone or replaced (e.g., renaming /blue-jeans/denim-jeans).
  • Why stronger than a canonical: Redirects pass SEO value directly and leave no room for Google to decide otherwise.

3. Sitemaps (a supporting signal)

  • What they do: List the URLs you want search engines to crawl and index.
  • When to use: Always, Shopify generates a sitemap automatically, but make sure only clean, canonical URLs are included.

4. Internal Links (your quiet superpower)

  • What they do: Show Google which URLs you value most by how you link internally.
  • Best practice: Always link to the canonical version (usually /products/...). Shopify defaults to this, but check custom menus, blogs, or banners.

Shopify Reality: What’s Automatic vs. When You Should Intervene

Here’s the good news: Shopify already takes care of canonical tags for most stores. If you’re using a theme from the Shopify Theme Store, your pages almost certainly include the proper canonical tags out of the box.

What Shopify Does Automatically

  • Product pages: Shopify will canonicalize product pages to their clean /products/product-handle URL. Even if the same product appears in a collection, the canonical points to the base product page (not the collection path).
  • Variants: URLs with ?variant=12345 are canonicalized to the main product page, so all versions roll up to one clean URL.
  • Marketing parameters: If your ads or email campaigns add tracking parameters (like ?utm_source=summer-sale), the canonical ignores those and points to the clean URL.
  • Blog posts and pages: By default, these are self-canonicalized; meaning the tag just points back to the page itself.

When You Might Need to Step In

There are a few edge cases where Shopify’s defaults aren’t enough:

  1. Older or custom themes
    • Some outdated or heavily customized themes may be missing canonical tags.
    • Fix: Add one line of code before the </head> in theme.liquid:
    • <link rel="canonical" href="{{ canonical_url }}">
  2. Google choosing the “wrong” canonical
    • Sometimes Search Console shows that Google has picked a different URL than the one you specified.
    • Fix: Strengthen the signals. Make sure your internal links point to the correct URL, check your sitemap, and consider adding a redirect if appropriate.
  3. When you want to override Shopify’s default
    • Example: You have two very similar product pages, but you want only one to rank.
    • Fix: Use a custom metafield called something like “Custom Canonical URL.” In your theme, update the canonical tag code to use that metafield if it’s filled in; otherwise, fall back to {{ canonical_url }}.
    • Shopiiy has a great article about how to achieve this: https://www.shopify.com/blog/set-canonical-url-shopify
    • There are also a variety of different apps on the Shopify App Store for this purpose.
  4. Migrations or consolidations

Troubleshooting: “Duplicate without user-selected canonical” & Other Gotchas

Even when Shopify adds canonical tags for you, Google doesn’t always listen. In Search Console, you may see errors or indexing quirks that make it look like something is broken. Here’s how to understand (and fix) the most common ones.

“Duplicate without user-selected canonical”

This is one of the most common messages Shopify merchants see in Search Console. It means:

  • Google found multiple versions of a page.
  • None of them had a canonical tag it trusted, so Google picked one on its own.

How to fix it:

  1. Inspect one of the URLs in Search Console. Compare the “user-declared canonical” (from your code) vs. the “Google-selected canonical.”
  2. If the user-declared one is missing, make sure you have the code in your theme. <link rel="canonical" href="{{ canonical_url }}">
  3. If it’s present but Google is ignoring it, check for mixed signals:
    • Are your internal links pointing to the clean /products/... URL?
    • Does your sitemap include the correct version?
    • Do you have redirects in place for any legacy URLs?

Canonical Health Check: Shopify Canonical URL Best Practices

1. Spot-check your pages

Confirm that canonical tags are present and correct.

  • Easy way: Install the free Detailed SEO Extension. Visit a product, collection, or blog post, click the extension, and it will show you the canonical URL instantly.
  • Manual way: Right-click → View Page Source (or Inspect Element). Search for canonical and check that you see something like:
  • <link rel="canonical" href="<https://yourstore.com/products/product-handle>" />

👉 If it’s missing, add this one line to your theme’s <head>:

<link rel="canonical" href="{{ canonical_url }}">

2. Check with Google Search Console

Search Console will show you how Google interprets your canonicals.

  • Open URL Inspection and paste a product page URL.
  • Compare the User-declared canonical (what your store says) to the Google-selected canonical (what Google actually uses).
  • They should match.

👉 If they don’t, review your internal links, sitemap, or add a redirect if needed.

Google Search Console URL Inspection for Canonical URL

3. Test product variants

  • Select a different variant on a product (e.g., size or color).
  • The URL will usually add ?variant=12345.
  • Inspect the canonical.  It should still point to the base product URL, not the parameterized one.

4. Verify collection-based URLs

  • Open a product inside a collection (e.g., /collections/sale/products/red-shirt).
  • Inspect the source or check with the Detailed extension.
  • The canonical should point to /products/red-shirt, not the collection version.

5. Review redirects for old URLs

  • If you’ve changed product handles or reorganized collections, type the old URL into your browser.
  • It should 301 redirect to the new canonical URL.

FAQs on Shopify Canonical URLs

How do I check if my Shopify canonical URLs are set up correctly?

  1. Spot-check your pages
    • Use the free Detailed SEO Extension to instantly see a page’s canonical URL.
    • Or, right-click → View Page Source and search for canonical.
    • You should see:
    • <link rel="canonical" href="<https://example.com/products/product-handle>" />
  2. Check with Google Search Console
    • In URL Inspection, compare the User-declared canonical (your site) with the Google-selected canonical (Google’s choice).
    • They should match.
    • (Insert screenshot of Google Search Console canonical comparison here)
  3. Test product variants
    • Switch to another size or color (adds ?variant=12345 in the URL).
    • The canonical should still point to the clean product URL.
  4. Verify collection-based URLs
    • Open a product through a collection path like /collections/sale/products/red-shirt.
    • The canonical should point to /products/red-shirt.
  5. Review redirects for old URLs
    • Type in an old product or collection URL.
    • It should 301 redirect to the new canonical URL. If not, add a redirect in Shopify under Online Store → Navigation → URL Redirects.

👉 If all five checks pass, your canonical setup is solid.

Is a canonical tag a directive?

No. Canonical tags are a hint to search engines, not a command. Google may choose a different URL if your other signals (redirects, internal links, sitemap) point somewhere else.

Should I use redirects or canonical tags?

  • Use a 301 redirect when a page is truly gone or replaced. Redirects are stronger and pass SEO value directly.
  • Use a canonical tag when you need both URLs to stay live for customers (like products in multiple collections), but only one should rank in Google.

Do I need to add canonical tags in Shopify?

Usually no. If you’re using a theme from the Shopify Theme Store, canonical tags are included by default. You only need to act if you’re using an older/custom theme or if you want to override Shopify’s defaults for specific pages.

What triggers “Duplicate without user-selected canonical” in Search Console?

This warning means Google found multiple versions of a page but didn’t see (or didn’t trust) your canonical tag. On Shopify, it often comes from:

  • Collection-based product URLs
  • Variant URLs with ?variant=12345
  • Marketing URLs with UTM parameters

Fix it by making sure your theme outputs a canonical tag, internal links point to the clean product URL, and redirects are set up where needed.

Resources

Future-Proof Your Shopify SEO

Get practical guides, technical SEO tips, and AI search insights straight to your inbox.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.