The canonical tag (<link rel="canonical">) tells Google which URL is the authoritative version of a page. On e-commerce sites where the same product is accessible via multiple paths (collections, filters, variants), it is the primary tool against duplicate content.
Canonical tag implementation
<head> <link rel="canonical" href="https://example.com/products/trail-shoes" /> </head>
In Next.js (App Router):
export const metadata = {
alternates: { canonical: 'https://example.com/products/trail-shoes' },
}Shopify automatic canonical
/products/slug even when the product is accessed via /collections/x/products/slug. Verify your theme does not override this behavior.Canonical for filter URLs
?sort=price&color=red) create thousands of duplicate URLs. Each filtered URL should have a canonical pointing to the unfiltered category URL.Cross-domain canonical
| Scenario | Canonical to | Result |
|---|---|---|
| Product via collection | /products/slug | PageRank concentrated on 1 URL |
| Filter URL ?color=red | /collections/shoes | Crawl budget saved |
| Variant with own URL | Main product URL | Variant not indexed separately |
| Paginated page /?page=3 | Page 1 or no canonical | Avoids indexing pagination |
Audit your canonical tags
30 min call · PDF report
