Skip to main content
Shopify guide

Canonical URL for Shopify Stores

By ยท Updated ยท 7 min read

How Shopify Handles Canonical URLs by Default

Shopify auto-generates a canonical tag on every storefront page using the format <link rel='canonical' href='...'> injected through the theme's layout files. For most product, collection, blog, and page templates, this tag points to the primary URL Shopify considers canonical โ€” typically the clean, shortest URL without query strings or UTM parameters.

The critical default behavior: Shopify product pages are accessible at two URL structures โ€” /products/[handle] and /collections/[collection-handle]/products/[handle]. Shopify automatically sets the canonical on the collection-scoped URL to point back to /products/[handle], consolidating link equity to one version. This behavior is built into Liquid theme code and does not require any app or configuration.

Where Shopify's Automatic Canonicalization Falls Short

Shopify strips query parameters from canonical tags across the board. That works well for UTM parameters and sort orders, but it creates a problem for faceted navigation. If a collection page appends ?color=red&size=M to filter results, the canonical still points to the base collection URL. Search engines receive no signal about whether those filtered pages should be indexed or ignored, so duplicate content can accumulate silently.

Pagination is another gap. Shopify uses ?page=2 query parameters for paginated collections and blog archives. The canonical on page 2 points to page 1 (the base URL), not to the paginated URL itself. This collapses all paginated content signals onto page 1, which means products appearing only on later pages get no independent indexing signal. Shopify deprecated rel=prev/next in 2019 and never provided a replacement.

International stores using Shopify Markets face a separate issue. Shopify generates hreflang tags for international subfolders or domains, but canonical management across locales requires careful auditing. A product accessible at /en-us/products/handle and /en-gb/products/handle needs each version to self-reference canonically rather than cross-reference, and Shopify does not always get this right without theme customization.

Shopify-Specific Canonical URL Conventions to Know

Every Shopify store enforces HTTPS and resolves www vs. non-www to a single preferred domain set in Settings > Domains. The canonical tag reflects whichever domain is marked as primary. If a merchant adds a third-party domain and sets it as primary, all canonical tags update automatically โ€” there is no manual tag editing needed in the theme.

Shopify appends .liquid extensions to theme template filenames but the rendered canonical URLs never expose these. The canonical for a product with handle 'blue-widget' is always https://[domain]/products/blue-widget with no extension. Shopify's URL structure is fixed โ€” merchants cannot change /products/, /collections/, /blogs/, or /pages/ as URL prefixes, which affects how canonical structure is planned for SEO.

Variant URLs are another Shopify-specific issue. When a customer selects a product variant, Shopify appends ?variant=XXXXXXXX to the URL. The canonical tag on variant URLs correctly points to the base product URL (/products/[handle]), preventing each variant from competing as a separate page. This is correct default behavior, but it means variant-specific content gets no independent indexing signal โ€” intentional for most stores, but worth knowing.

Apps and Theme Code That Fix Canonical Gaps

For faceted navigation, apps like Boost Commerce Product Filter & Search and Searchpie generate JavaScript-driven filtering that keeps the browser URL clean (or updates it predictably). Some of these apps include canonical tag management as part of their SEO settings, letting merchants designate the unfiltered collection URL as canonical regardless of active filters. Confirm any filter app's canonical behavior before installing โ€” some apps do not touch canonical tags at all and leave merchants exposed to duplication.

For stores that need custom canonical overrides on specific pages โ€” a duplicated landing page, a promotional URL that mirrors a product page โ€” the cleanest fix is editing the theme's layout or template files directly. In Dawn and other Shopify-supported themes, the canonical tag lives in theme.liquid inside the <head> block. Adding a Liquid conditional that checks for a metafield value (e.g., page.metafields.seo.canonical_url) lets merchants override canonical URLs per-page through the Shopify admin without touching code again.

Shopify's native SEO tab in the product and page admin exposes a URL handle field and meta title/description fields, but it does not expose a canonical URL override field. This is a documented limitation. The metafield workaround above is the standard merchant-side solution used by Shopify Plus agencies when full developer access is not available.

Auditing Canonical Tags on a Shopify Store

Crawl the store with Screaming Frog or Ahrefs Site Audit and filter for pages where the canonical URL does not match the current page URL. On a Shopify store, expect to see this on every /collections/[collection]/products/[handle] URL โ€” that is intentional. Flag any page where the canonical points to a 404, a redirected URL, or a domain different from the live primary domain.

Check Google Search Console's Page Indexing report under the 'Duplicate without user-selected canonical' and 'Google chose different canonical than user' statuses. These two labels indicate where Shopify's automatic canonical tags are either absent or unconvincing to Google. Products that Shopify considers canonical at /products/handle but Google indexes at the collection-scoped URL are a common finding and require no fix โ€” Google's choice does not mean the canonical is wrong.

Run a spot-check on the store's primary collection pages with active filters applied. View page source and search for 'canonical'. If the canonical value changes based on filter state, an app or theme customization is overriding Shopify's default โ€” audit whether that override is deliberate. If the canonical stays fixed at the base collection URL regardless of filters, the default behavior is intact.

Actionable Steps for Shopify Canonical URL Management

Start with a crawl to confirm the default canonical structure is intact and no theme app or third-party script is overwriting canonical tags incorrectly. Then check three high-risk areas specific to Shopify: faceted filter pages, Shopify Markets locale URLs, and any custom landing pages built by duplicating existing page templates. These three areas account for the majority of canonical errors found on mid-to-large Shopify stores.

For stores on Shopify Plus, request that the development team implement a metafield-driven canonical override system in the theme. This costs minimal development time and gives the merchandising team direct control over canonical URLs for promotional or editorial pages without a code deploy. For standard Shopify plans, use an SEO app that exposes a canonical field per page, or plan canonical strategy around the fixed URL structure Shopify enforces rather than trying to override it.

Frequently asked questions

Does Shopify automatically add canonical tags to all pages?

Yes. Shopify injects a canonical tag into every storefront page through the theme's layout file. Product pages, collection pages, blog posts, and standard pages all receive a canonical tag pointing to Shopify's preferred URL for that resource. Merchants do not need an app for basic canonical tag coverage โ€” it is built into the platform.

Why do Shopify product URLs appear twice โ€” does that cause duplicate content issues?

Shopify makes products accessible at both /products/[handle] and /collections/[collection]/products/[handle]. Shopify automatically sets the canonical on the collection-scoped URL to point to /products/[handle], consolidating signals to one version. Google reads these canonicals correctly in most cases, so duplicate content penalties are not triggered by this default behavior.

Can merchants override the canonical URL on a specific Shopify page without editing theme code?

Not through the native Shopify admin. The product and page SEO tab does not include a canonical URL field. The standard workaround is to store a custom canonical value in a metafield and reference it in the theme's layout file with a Liquid conditional. Some SEO apps on the Shopify App Store expose this field directly through their interface.

How does Shopify handle canonical URLs for variant pages?

When a product variant is selected, Shopify appends ?variant=XXXXXXXX to the URL. The canonical tag on these variant URLs points to the base product URL โ€” /products/[handle] โ€” not the variant-specific URL. This prevents each variant from being treated as a separate indexable page. It is correct default behavior for most stores selling variants of the same product.

Does installing a Shopify SEO app risk breaking existing canonical tags?

Some SEO apps inject their own canonical tags without removing the canonical already in the theme, resulting in two canonical tags on one page โ€” an invalid state that search engines resolve unpredictably. Before installing any SEO app, check its documentation for canonical tag behavior, then crawl the store after installation to confirm only one canonical tag appears per page.

MG
Written by

Matt is the founder of RunOctopus. He built All Angles Creatures from zero to page-1 rankings in reptile feeder insects in under 60 days using exactly this method โ€” turning a hard, entrenched niche into RunOctopus's proof store for programmatic SEO and AI search citation.

Connect on LinkedIn →

See what Otto would build for your store

Free architecture preview. No card required. Five minutes.

Generate Preview →