Generate proper canonical tags to prevent duplicate content penalties. Consolidate link equity and tell search engines which version is the master copy.
Enter your URL to generate a self-referencing canonical tag
The URL for which you want to generate a canonical tag
π Implementation: Copy this tag and place it in the <head>
section of your page.
Canonical tags are essential in many common website scenarios where duplicate or near-duplicate content exists:
E-commerce sites often have products in multiple categories, creating different URLs for the same product:
example.com/shoes/nike-air-max
example.com/sports/running/nike-air-max
example.com/brands/nike/nike-air-max
All should have a canonical tag pointing to your preferred version.
Tracking parameters, session IDs, and sorting options create duplicate content:
example.com/products
example.com/products?utm_source=email
example.com/products?sort=price
example.com/products?sessionid=abc123
If you have printer-friendly versions, canonicalize to the standard page to avoid duplicate content.
If you have separate mobile URLs (m.example.com), use canonical tags to indicate the relationship. However, responsive design is now preferred over separate mobile URLs.
When migrating to HTTPS, canonical tags help consolidate the old HTTP and new HTTPS versions (though 301 redirects are preferred).
Choose one version (www or non-www) and use canonical tags consistently across your site.
example.com/page
example.com/page/
Choose your preferred format and use canonical tags to consolidate both versions.
Add the canonical tag in the <head>
section of your HTML:
<!DOCTYPE html>
<html>
<head>
<title>Your Page Title</title>
<link rel="canonical" href="https://example.com/preferred-url" />
</head>
<body>
...
</body>
</html>
For non-HTML content (PDFs, images), use HTTP headers:
Link: <https://example.com/preferred-url>; rel="canonical"
Only include canonical URLs in your XML sitemap. Don't list duplicate or non-canonical versions.
β Using Relative URLs
Wrong: <link rel="canonical" href="/page" />
Correct: <link rel="canonical" href="https://example.com/page" />
β Multiple Canonical Tags
Never have more than one canonical tag per page - search engines will ignore them all
β Canonical to Different Content
Only canonicalize pages with substantially similar content - not completely different pages
Feature | Canonical Tag | 301 Redirect |
---|---|---|
User Experience | Users see the duplicate page | Users redirected to canonical |
PageRank Transfer | Yes (~95-99%) | Yes (~95-99%) |
When to Use | Keep duplicates accessible | Permanent URL changes |
Processing Time | Hint (may be ignored) | Directive (must follow) |
Use 301 redirects when you want users to only access the canonical version. Use canonical tags when duplicates need to remain accessible but you want search engines to consolidate signals.
Canonical tags: Tell search engines "this duplicate is fine, but index the canonical version instead"
Noindex: Tell search engines "don't index this page at all"
Never use noindex and canonical together - these are conflicting signals that confuse search engines.
Google Search Console allows you to specify how URL parameters should be handled. This is complementary to canonical tags:
You can use canonical tags across different domains when syndicating content:
<link rel="canonical" href="https://original-site.com/article" />
Important: Cross-domain canonicals only work if the original domain has higher authority. Google may ignore them otherwise.
A canonical chain occurs when canonical tags create a sequence:
Page A β canonical β Page B β canonical β Page C
This wastes crawl budget and dilutes ranking signals. Always point directly to the final canonical URL.
For paginated content series:
When you have translated versions of content:
For large sites, generate canonical tags programmatically:
// PHP example
$canonical_url = 'https://example.com' . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
echo '<link rel="canonical" href="' . htmlspecialchars($canonical_url) . '" />';
This ensures every page has a self-referencing canonical that strips tracking parameters.
A canonical tag (rel="canonical") is an HTML element that tells search engines which version of a page is the master copy when you have duplicate or similar content. It's crucial for preventing duplicate content penalties, consolidating link equity to your preferred URL, and ensuring the right pages appear in search results. Without canonical tags, you risk diluting your SEO efforts across multiple similar pages.
Yes, cross-domain canonical tags are supported by Google and other search engines. This is particularly useful when syndicating content or publishing the same article on multiple sites. However, the target domain must have authority for Google to honor the canonical. If you're a small site canonicalizing to a major publisher, it will likely work. The reverse may not be honored.
301 redirects permanently move users and search engines to a new URL, while canonical tags only signal to search engines which version to index without redirecting users. Use 301 redirects for permanent URL changes where you don't want users accessing the old URL. Use canonical tags when you need duplicate pages to remain accessible to users, but want search engines to consolidate signals to one preferred version.
Yes, it's considered an SEO best practice to add self-referencing canonical tags to all pages. This prevents search engines from treating URL variations (with tracking parameters, session IDs, trailing slashes, etc.) as separate pages. It consolidates all signals to your preferred URL format and eliminates ambiguity. Even if you don't have obvious duplicates, self-referencing canonicals provide protection against technical duplicate content issues.
For paginated content, each page should have a self-referencing canonical tag pointing to itself (page 1 β page 1, page 2 β page 2, etc.). Don't canonical all paginated pages to page 1 unless they're true duplicates, as this removes valuable content from the index. If you have a "View All" page that displays all content on one page, that can be set as the canonical for all paginated pages. You can also use rel=prev/next tags alongside canonicals for additional context.
Yes, canonical tags pass PageRank similarly to 301 redirects. Google has confirmed that they treat canonical tags as consolidating ranking signals to the canonical URL. However, canonical tags are hints, not directives. This means Google may choose to ignore them if the implementation doesn't make sense (e.g., pointing to vastly different content). When properly implemented, you can expect around 95-99% of link equity to be consolidated to the canonical URL.
If a page has multiple canonical tags, Google will likely ignore all of them. This can happen when different plugins or templates each try to add canonical tags, or when both HTML and HTTP header canonicals conflict. The result is that Google may choose its own preferred URL version, which might not be what you want. Always ensure only one canonical tag per page and audit your implementation regularly with tools like Screaming Frog or Sitebulb.
Canonical tags are primarily designed for HTML pages. For images, you should focus on proper image licensing metadata, EXIF data, and using Image Rights Metadata instead. For videos, use VideoObject schema markup. For PDFs and other documents, you can use HTTP header canonicals (Link:
Google typically processes canonical tags during the next crawl of your pages, which can range from a few days to several weeks depending on your site's crawl frequency and authority. High-authority sites with frequent crawling may see canonicals honored within days. For new or less authoritative sites, it might take weeks. You can speed this up by submitting your sitemap in Google Search Console and using the URL Inspection tool to request indexing of your canonical URLs. Monitor the "Page Indexing" report in Search Console to see if your canonicals are being honored.
Yes, only canonical URLs should be included in your XML sitemap. Never list duplicate or non-canonical versions in your sitemap, as this sends mixed signals to search engines about which pages you want indexed. Your sitemap should be a list of your preferred, canonical URLs that you want search engines to crawl and index. Including non-canonical URLs in your sitemap wastes crawl budget and can confuse search engines about your true preferred versions. Regularly audit your sitemap to ensure it only contains canonical URLs.
Get real-time alerts when canonical tags change or break on your website. Prevent duplicate content issues before they hurt your rankings.