How to fix seo variant urls not canonicalized on Shopify
Add a canonical tag to every product variant URL pointing back to the base product page, so Google consolidates ranking signals on one URL instead of splitting them across hundreds of duplicates.
Steps for Shopify
- Shopify automatically adds a canonical tag to product pages via its theme. The tag is output by the Liquid snippet {{ canonical_url | tag: 'canonical' }} (or similar) in your theme's <head>.
- Go to Online Store → Themes → your active theme → Edit code.
- Open theme.liquid (or the layout file such as base.liquid in Dawn). Search for 'canonical'.
- Shopify sets canonical_url to the base product URL by default. HOWEVER, if a variant is selected via a query parameter (?variant=XXXXXXXX), some themes or apps may override this — verify on a live variant URL using View Source or the URL Inspection tool in Google Search Console.
- If the canonical is correct (base product URL, no ?variant= parameter), no change is needed. If it incorrectly includes variant parameters, replace the canonical line with: <link rel="canonical" href="{{ product.url | prepend: shop.url }}"> — this always resolves to the base product URL regardless of the selected variant.
- For collection-scoped URLs (e.g. /collections/X/products/Y), ensure the canonical points to the canonical product URL (/products/Y), not the collection-scoped version: use {{ product.url | prepend: shop.url }} which Shopify resolves to the /products/ path.
What is seo variant urls not canonicalized?
When shoppers (or your platform) navigate to a product with a colour, size, or style selected, the URL often changes — a query parameter like `?color=Pop+Red` or `?size=M` gets appended to the base product URL. Each of those variant URLs is effectively a separate page in Google's eyes. A canonical tag is a small snippet of HTML code (placed in the `<head>` of a page) that tells search engines: "The true, original version of this content lives at this URL." Pointing every variant URL's canonical at the clean, base product URL is the standard way to tell Google that all those variants are the same product, just filtered differently.
Without canonical tags on variant URLs, Google may index hundreds or thousands of near-duplicate pages for a single product. This splits your page's authority (link equity) across all those URLs instead of concentrating it on one, directly weakening your product page's ability to rank. Google may also choose a variant URL as the canonical itself — one that may disappear when stock runs out — causing rankings to drop unpredictably. Crawl budget is wasted re-crawling redundant variants instead of discovering new or updated pages. Fixing this consolidates all ranking signals on your main product page, typically improving organic visibility and protecting you against ranking volatility as variants come and go.
See the complete Seo variant urls not canonicalized guide for every platform and the full background.
Not sure if your Shopify store has this?
Run a free SEOLZ scan — we’ll find seo variant urls not canonicalized and every other issue across your whole site.
Scan my site free