Canonical Tag
An HTML tag that tells search engines which version of a page should be considered the authoritative or primary version when duplicate or similar content exists across multiple URLs.
What is Canonical Tag?
The canonical tag (also called canonical link) is an HTML element used to address duplicate content issues by specifying the preferred version of a page when multiple URLs contain the same or very similar content. It signals to search engines which URL should be indexed, ranked, and credited with link equity when multiple URLs serve identical or near-identical content. The canonical tag is particularly valuable for e-commerce sites that have the same product accessible via multiple URL variations (color variations, sorting parameters, query strings), and for large websites with multiple domains, http/https versions, or www/non-www variations. Without canonical tags, search engines might waste crawl budget indexing duplicate versions, potentially causing rankings to be split across multiple URLs, diluting the authority of your preferred version. A canonical tag looks like: <link rel="canonical" href="https://example.com/page"/> and is placed in the <head> section of the HTML. The canonical URL should point to the version you want search engines to prefer—typically the most complete, user-friendly version. Canonicals are most effective when the pages are very similar; they're not a substitute for redirects when pages have significantly different content.
Why It Matters for SEO
Canonical tags prevent the negative effects of duplicate content by consolidating ranking signals and crawl budget. Without proper canonical implementation, search engines might index multiple versions of your page, splitting your link equity, authority, and rankings across multiple URLs. This makes your site appear less authoritative for your target keywords. Proper canonicalization ensures all of your ranking power flows to your preferred version. Canonicals also help large websites manage complexity—e-commerce sites with thousands of product variations become manageable when canonicals handle URL parameter variations. Google respects canonicals as a strong signal about your preferred version, and proper implementation is essential for large websites.
Examples & Code Snippets
Canonical Tag HTML Implementation
<!-- EXAMPLE 1: Self-referential canonical (recommended for all pages) -->
<head>
<link rel="canonical" href="https://example.com/blog/seo-guide" />
</head>
<!-- EXAMPLE 2: Handling URL parameters (e-commerce) -->
<!-- Page: https://example.com/product?id=123&color=red&size=large -->
<head>
<link rel="canonical" href="https://example.com/product?id=123" />
<!-- Point to base product URL, ignoring color/size parameters -->
</head>
<!-- EXAMPLE 3: HTTP vs HTTPS -->
<!-- Page: http://example.com/page -->
<head>
<link rel="canonical" href="https://example.com/page" />
<!-- Prefer HTTPS version -->
</head>
<!-- EXAMPLE 4: WWW vs non-WWW -->
<!-- Page: https://www.example.com/page -->
<head>
<link rel="canonical" href="https://example.com/page" />
<!-- Prefer non-www version -->
</head>
<!-- EXAMPLE 5: Printer-friendly page -->
<!-- Page: https://example.com/article?print=true -->
<head>
<link rel="canonical" href="https://example.com/article" />
<!-- Point to standard version -->
</head>
<!-- EXAMPLE 6: Duplicate content across domains -->
<!-- Page: https://replica.example.com/product -->
<head>
<link rel="canonical" href="https://example.com/product" />
<!-- Cross-domain canonical -->
</head>How to properly implement canonical tags in HTML
Always use self-referential canonicals on unique pages (every page should have a canonical pointing to itself). For duplicate content, point the secondary URLs to the authoritative version. Ensure canonical URLs are absolute (include domain), on the same domain or cross-domain if appropriate, and point to existing pages that return 200 status codes.
Frequently Asked Questions
Ready to Grow Your Organic Traffic?
Get a free SEO audit and a custom strategy roadmap for your business. No commitment required — just results-focused recommendations from our team.