Canonical Tags in Shopify
How Shopify auto-generates canonicals, the collection-versus-product URL behavior, and how to customize the tag in theme.liquid.
Magento's canonical tags aren't automatic — they're a setting you have to find and turn on yourself.
In Magento and Adobe Commerce, canonical tags are not something you get out of the box on catalog pages. Community consensus among Magento developers — this isn't a single documented Adobe statement so much as the near-universal, hands-on-the-admin-panel experience — is that both canonical settings ship set to No. A fresh Magento install, or a store nobody has revisited since setup, is very likely serving product and category pages with no rel=canonical tag in the head at all.
The two settings live under Stores > Configuration > Catalog > Catalog > Search Engine Optimization, and they're named plainly: "Use Canonical Link Meta Tag for Categories" and "Use Canonical Link Meta Tag for Products." Each is an independent toggle — you can enable canonicals for categories, products, both, or neither, and Magento treats them as unrelated switches even though they address the same underlying problem: Magento's URL structure often makes the same product or category reachable through more than one URL.
Treat "off by default" as the working assumption for any Magento site audit, since it's the consistently reported pattern rather than a documented guarantee — but confirm it by viewing source on an actual product or category page rather than assuming.
Enabling canonical tags in Magento is a configuration change, not a code change — though a cache flush afterward is not optional. In the Admin panel, go to Stores > Configuration > Catalog > Catalog > Search Engine Optimization. You'll find the two toggles described above. Set the ones you want to Yes, then click Save Config.
Two details matter more than they look like they should:
There is no admin field anywhere in Magento to hand-edit the canonical URL for one specific product or category. Once the toggle is on, the canonical tag is generated programmatically from the entity's URL key — there's no text box to override it the way there is in, say, a WordPress SEO plugin. Per-entity control beyond what Magento generates requires custom code or a third-party extension.
Once "Use Canonical Link Meta Tag for Products" is enabled, Magento builds the product canonical from the store domain plus the product's URL key — and nothing else. It deliberately omits any category path, regardless of which URL a visitor actually used to reach the page. So if a product is browsable at both a category-nested URL and a flat URL, the canonical always points to the flat form, something like:
http://mystore.com/driven-backpack.htmlThat holds even if the page was requested at a category-prefixed path. The canonical tells search engines "index this bare URL," not "index whatever URL you happened to crawl."
For categories, enabling the equivalent toggle produces a canonical pointing to the category's full path — the category canonical is not stripped down the way the product canonical is.
This interacts directly with a separate setting, "Use Categories Path for Product URLs," which controls whether product URLs themselves are built to include the category path (for example /gear/backpacks/driven-backpack.html instead of /driven-backpack.html). When that setting is on, a single product becomes reachable at both the category-nested URL and the bare URL — and the product canonical still resolves to the bare form. The "Use Categories Path" setting changes what URLs Magento builds and links to; the product canonical setting changes what URL Magento tells search engines is authoritative. They aren't the same lever, and it's easy to assume turning on one automatically coordinates with the other.
This is the part that trips people up most: Magento's built-in canonical does not solve the layered-navigation (faceted search) duplicate-content problem, and it was never designed to.
Layered navigation — the filter sidebar that lets shoppers narrow a category by color, price, size, and so on — generates URLs with query string parameters: ?color=blue, ?price=10-20, ?sortby=price, and combinations of all three. Even with the built-in category canonical setting turned on, Magento does not strip these parameters when it builds the canonical tag for a filtered page. Instead, a filtered URL emits a self-referencing canonical — pointing at itself, filters and all — rather than back to the clean, unfiltered category page.
That means every color, price, and sort combination a shopper can construct through the filter sidebar is treated by the canonical tag as its own canonical page rather than a variant to be consolidated into the parent category. The built-in setting solves the product/category duplicate-URL problem it was built for; it does not solve the much larger surface area of filtered-URL duplication layered navigation creates.
Because Magento's own canonical mechanism won't do this work, practitioners typically reach for one or more of the following instead:
One caution on older advice: Google deprecated the URL Parameters tool in Search Console in 2022, so any guidance that tells you to configure parameter handling there is out of date. Pagination canonicals (?p=2 and similar) are also handled inconsistently across Magento versions, so verify actual behavior on your version rather than assuming.
No. The two built-in toggles under Catalog > Search Engine Optimization only cover catalog entities — products and categories. CMS pages and the homepage aren't covered by this setting.
They're set per store view, so a multi-store-view Magento installation needs the toggle checked — and enabled if needed — separately for each store view rather than assumed to apply everywhere from a single change.
No. There's no admin field for an individual product or category canonical. Once the toggle is enabled, Magento generates the canonical programmatically from the URL key; per-entity overrides require custom code or a third-party extension.
No. Magento's built-in canonical does not strip layered-navigation query parameters like color, price, or sort order — a filtered URL self-canonicalizes to itself. Faceted-navigation duplication needs to be handled separately, with noindex, crawl controls, dedicated landing pages, or a canonical-management extension.
Most often it's cache. Magento's configuration and full-page cache can keep serving old head markup after you save the setting — flush the cache after changing it and re-check the rendered HTML.
How Shopify auto-generates canonicals, the collection-versus-product URL behavior, and how to customize the tag in theme.liquid.
WooCommerce adds no canonical layer of its own; it relies on WordPress and your SEO plugin. The real work is taming filter, sort, and pagination URLs.
BigCommerce adds self-referencing canonicals automatically and folds a product's multiple category URLs to one canonical product URL.