Canonical Tag Generator
Generate canonical link tags to prevent duplicate content SEO issues. Tell Google which URL is the original.
Generated Canonical Tag
What is a Canonical Tag?
A canonical tag (<link rel="canonical" href="..." />) tells search engines which URL is the ‘official’ version of a page when multiple URLs serve identical or near-identical content. Same content available via multiple URLs causes duplicate content issues — Google has to choose which to rank, often picking wrong, and SEO value gets split. The canonical tag solves this by explicitly declaring the preferred URL. Critical for: e-commerce sites with sort/filter parameters (?sort=price), pagination, syndicated/cross-posted content, print-friendly versions, mobile-vs-desktop URLs, HTTP-vs-HTTPS legacy issues, www-vs-non-www variations, trailing-slash inconsistencies.
How to use this tool
- Enter your canonical URL — The OFFICIAL version of the page (the URL you want indexed).
- Tool generates the tag —
<link rel="canonical" href="..." /> - Copy and paste in <head> — Place inside the HTML
<head>section. - Verify with browser DevTools — Check Sources tab — canonical link should appear in head.
When to use canonical tags
Scenario 1: Duplicate URLs serving same content
https://example.com/product https://example.com/product?ref=newsletter https://example.com/product?utm_source=facebook All three: <link rel="canonical" href="https://example.com/product" />
Scenario 2: Sort/filter parameters
https://shop.com/category https://shop.com/category?sort=price&color=blue https://shop.com/category?sort=newest All point canonical to: https://shop.com/category
Scenario 3: Pagination
/blog/page/1 → canonical to /blog/page/1 (self-reference) /blog/page/2 → canonical to /blog/page/2 (NOT page 1!) Each paginated page canonicals to itself
Scenario 4: Syndicated content
You publish article on Medium. Medium auto-adds canonical pointing back to your original post URL. Google credits your domain, not Medium.
Examples
- Product page with tracking parameters: Canonical points to clean URL without ?utm_x params
- E-commerce filter URLs: /shoes/?color=red canonical → /shoes/
- Print version: /article/print canonical → /article
- HTTP-to-HTTPS migration: HTTP version canonical → HTTPS version
- www-vs-non-www: Both versions canonical → preferred (use 301 redirect too)
- Mobile m.example.com: Mobile version canonical → desktop version
Tips & best practices
- ALWAYS include self-referencing canonical — even on the canonical version, declare itself
- Use absolute URLs (https://example.com/page), not relative
- Place canonical tag inside
<head>— not body - WordPress: Yoast SEO or Rank Math handle canonical automatically
- Don't canonical to a 404 page — canonical target must exist
- Don't use multiple canonical tags on same page — Google ignores all
- Combine with 301 redirects when consolidating URLs — canonical alone isn't a redirect
Limitations & notes
Canonical is a HINT to search engines, not a directive. Google may choose to ignore it if signals conflict (different content, very different titles). For strong canonicalization, combine canonical + 301 redirects + internal linking to preferred URL. Don't use canonical for fundamentally different content — that's an SEO violation.
Frequently Asked Questions
What if I don't use canonical tags?
Google will pick one URL to index when it finds duplicates — often not the one you'd prefer. SEO value gets split or assigned to wrong URL. Canonical is essential for any site with potential duplicate URLs.
Can I canonical to a different domain?
Yes — for syndicated content. Example: republish your blog on Medium with canonical pointing back to your domain. Google credits your domain, not Medium.
Should every page have a canonical tag?
Yes — even if URL is unique. Self-referencing canonical confirms ‘this is the official version’. SEO plugins typically add automatically.
What's the difference between canonical and 301 redirect?
301 = users and bots redirected to new URL (old URL inaccessible). Canonical = users can still access either URL, but bots index only the canonical version. Use 301 when old URL truly retired; canonical when both serve content but one is preferred.
Can I have multiple canonical tags?
Bad practice — Google ignores all conflicting canonicals on a page. Place exactly ONE in the head, period.
Does canonical affect page ranking?
Canonical doesn't directly boost rankings. But it consolidates SEO signals (links, traffic) from duplicate URLs to one canonical URL — that consolidated authority ranks better than fragmented signals.
What about canonical for mobile-specific URLs?
If using separate m.example.com, mobile pages should canonical to desktop equivalents. Modern practice: responsive design (one URL serves all devices), no separate mobile URLs needed.
Related tools
Hreflang Tag Generator · Meta Tag Generator · Redirect Checker
