Skip to content
SEOScanShopify SEOFix: Missing Canonical Tags

Fix Missing Canonical Tags on Shopify

Medium Priority
Direct Answer

Shopify automatically adds canonical tags to most pages via the {{ canonical_url }} Liquid variable, pointing product pages to their /products/[handle] URL. The problem occurs when a theme removes or overrides this, or when paginated and filtered pages lack correct canonicals. Check that your theme.liquid includes <link rel="canonical" href="{{ canonical_url }}"> and that collection pages with ?sort_by= parameters correctly self-canonicalise to the base collection URL.

The Problem

Shopify's URL architecture creates multiple valid URLs for the same content - product pages accessible via /products/ and /collections/[name]/products/, tag-filtered collection pages, sort-by parameter URLs, and pagination. Without correct canonical tags, Google may index the wrong version, split ranking signals, or flag the site for duplicate content.

Impact: Incorrect or missing canonical tags cause Google to split link equity across multiple URLs, weakening all versions. The Shopify /collections/[name]/products/[handle] URL pattern is a well-known source of duplicate content - without a canonical pointing to /products/[handle], both versions can appear in the index simultaneously.

How to Fix It (Step-by-Step)

1

Verify the canonical tag exists in your theme

Right-click any product page → View Page Source → search for rel="canonical". You should find a single <link rel="canonical"> tag. If it is missing, your theme has removed it. If there are multiple canonical tags, only the first one will be respected by Google.

2

Check the theme.liquid canonical tag Liquid variable

In Online Store → Themes → Edit code → theme.liquid, search for canonical. You should find {{ canonical_url }} used in a <link rel="canonical"> tag. If it is missing, add it inside the <head> section.

liquid
{%- comment -%} Place in <head> of theme.liquid - Shopify sets canonical_url automatically {%- endcomment -%}
<link rel="canonical" href="{{ canonical_url }}">
3

Understand how Shopify sets canonical_url

Shopify's {{ canonical_url }} variable automatically returns: the shop root for the homepage, /products/[handle] for product pages (even when accessed via a collection URL), /collections/[handle] for collections (without sort/filter params), and /pages/[handle] for pages. This is correct behaviour - do not override it with a custom URL unless you have a specific reason.

4

Audit product pages accessed via collection URLs

URLs like /collections/shirts/products/blue-tshirt should canonicalise to /products/blue-tshirt. Test this by visiting a product via a collection link, then checking the canonical tag in page source. Shopify handles this correctly by default via canonical_url - verify your theme has not broken it.

5

Check canonical tags on paginated collection pages

Collection pages with pagination (/collections/dresses?page=2) should have a canonical pointing to /collections/dresses (page 1). Check that your theme does not add a self-referential canonical on paginated pages. Shopify's canonical_url does not include page parameters by default.

6

Handle sort-by and filter parameter URLs

Shopify storefront filters generate URLs like /collections/dresses?sort_by=price-ascending&filter.p.tag=summer. These should self-canonicalise to the base collection. Check whether your theme's collection template adds any custom canonical logic for filtered pages.

liquid
{%- comment -%} Safe canonical for collection pages including filtered/sorted variants {%- endcomment -%}
{%- if template.name == 'collection' -%}
  <link rel="canonical" href="{{ shop.url }}/collections/{{ collection.handle }}">
{%- else -%}
  <link rel="canonical" href="{{ canonical_url }}">
{%- endif -%}
7

Validate with Google Search Console

In Search Console → URL Inspection, enter several product URLs that are accessible via collection paths. The inspection will show Google's canonical URL decision. If Google has chosen a different canonical than your intended URL, investigate why and fix the conflicting signals.

8

Check for app-injected canonical tags

Some Shopify SEO apps inject their own canonical tags, creating duplicate <link rel="canonical"> tags. Google will use the first one it encounters. Use Chrome DevTools → Elements tab → search for "canonical" to see all canonical tags on the page including those added via JavaScript.

Common Mistakes to Avoid

Adding a hardcoded canonical URL in the theme instead of using canonical_url

Some theme customisations hardcode a fixed URL in the canonical tag (e.g., href="https://yourstore.com/") for every page. This is a critical error - it tells Google that every page on your site is a copy of the homepage, which will catastrophically damage your rankings. Always use {{ canonical_url }}.

Using canonical_url without the shop URL on non-Shopify domains

If your store uses a custom domain but {{ canonical_url }} is being used without the full domain context, verify the canonical tag outputs the correct full URL with https://. In Shopify, canonical_url always includes the full domain - but check this in page source on your live store to confirm.

Ignoring canonical tag issues from third-party apps

Review and translation apps sometimes add their own canonical tags pointing to localised URLs. If you have multiple canonical tags on a page, Google picks the first one - which may not be the one you intend. Audit all canonical tags across your store including JavaScript-rendered ones.

Complete Code Example

{%- comment -%} Canonical tag - place in <head> of theme.liquid {%- endcomment -%}
<link rel="canonical" href="{{ canonical_url }}">

{%- comment -%} Verify this outputs correctly for a product accessed via a collection:
  /collections/shirts/products/blue-tshirt
  Should output: https://yourstore.com/products/blue-tshirt
  (not the collection-path URL) {%- endcomment -%}

Frequently Asked Questions

Q: Does Shopify automatically handle canonical tags?

Yes - Shopify sets the {{ canonical_url }} variable for every page template, and themes are expected to output it as a <link rel="canonical"> tag. The default Shopify themes (Dawn, Debut, etc.) all include this. However, custom themes, heavily modified themes, or themes from certain marketplace providers sometimes remove or override this, which causes duplicate content problems.


Q: Why does my Shopify product appear at two different URLs in Google?

The most common reason is that both /products/[handle] and /collections/[collection-name]/products/[handle] are being indexed. This happens when: (1) the canonical tag is missing or pointing to the wrong URL; (2) both URLs have been linked to from external sites; or (3) a sitemap is including both URLs. Fix by ensuring {{ canonical_url }} is present and that your sitemap only lists /products/[handle] URLs.


Q: Should I use canonical tags or 301 redirects to fix Shopify duplicate content?

For Shopify's built-in duplicate URL patterns (collection-path product URLs, sort-by parameters, tag filters), canonical tags are the correct solution - because these URLs need to remain accessible for navigation and filtering. Use 301 redirects only when you have permanently moved a page to a new URL. Canonical tags are a softer signal to Google about your preferred URL; 301 redirects are definitive.

Not Sure If You Have This Issue?

Run a free scan to detect this and other SEO problems on your Shopify store instantly.

Free SEO Scan

Other Common Shopify SEO Issues

Go Deeper

Deep Dive: Missing Canonical Tags

Detailed technical documentation - seoscan.dev/shopify/canonical-mismatch

Related Scan Topic

seoscan.dev/shopify-seo-scan/duplicate-content

All Shopify SEO Issues

Browse the full Shopify SEO issue library