Skip to main content
SerpGem
Technical SEO

Canonical Tag Generator

Build a valid rel=canonical link tag for any page. Prevents duplicate-content issues from tracking parameters, printer versions, and multi-URL access patterns.

How to use this tool3 quick steps
  1. Enter the canonical URL

    The absolute, preferred URL of this page. Use the same URL Google should index — usually the HTTPS version, no trailing slash variations.
  2. Copy the generated tag

    Paste the output inside your page's <head>. One canonical per page — multiple canonicals cause Google to ignore both.
  3. Self-referencing vs. cross-page

    Pointing to itself tells Google this is the authoritative version. Pointing elsewhere consolidates authority to the target page.
InputCanonical URL

The absolute, preferred URL of this page. Must be fully qualified with https://.

OutputCanonical tag

Use this with

See all 9 tools

Canonical URL Guide

The tag that prevents duplicate-content chaos

One page can be reached by many URLs — with query params, with or without trailing slash, HTTP and HTTPS, www and non-www, printer-friendly versions. Canonical tags tell Google which URL is the 'real' one so ranking signals consolidate instead of splitting across variants.

Self-referencing canonicals

Every page should have a canonical pointing to itself (the clean, preferred URL). This makes intent explicit and protects against parameter-based duplicates — critical when tracking pixels, UTMs, and session IDs create surprise variants.

Cross-URL canonicalization

When you have two genuinely different URLs serving the same content (e.g., /products/widget and /shop/widget), pick one as canonical and point the other at it. Google treats them as a single page and consolidates link equity.

Always absolute, always HTTPS

Relative canonicals (/page) work but are fragile — they break if Google crawls your page from a non-standard URL. Always use the full absolute URL. And always HTTPS if it's available.

Trailing slash consistency

Pick one: /blog/post OR /blog/post/ — and use it consistently across canonicals, internal links, and server redirects. Mixed styles create unnecessary duplicates.

One canonical per page

Multiple canonical tags on one page are ignored by Google — they see it as a conflict. Audit your template to make sure you're not double-outputting the tag from different partials.

Paginated pages

For /page/1, /page/2, /page/3, each page's canonical should point to itself, NOT to page 1. Let Google index each page individually — that's how they were designed.

Pro Tips

Add to <head>, never <body>

Google technically parses canonical from either, but the spec requires <head>. Some third-party tools only look in <head> — stay safe.

Test with Search Console

After adding canonicals, check Search Console's URL Inspection tool. It reports 'User-declared canonical' and 'Google-selected canonical' — you want those to match.

Don't canonicalize across domains casually

Cross-domain canonicals work but concentrate all ranking signals onto one domain. Only use when you genuinely want to merge two sites (e.g., during a migration).

?

Frequently Asked Questions

What's the difference between canonical and 301 redirect?
301 redirects send users and crawlers to a different URL entirely. Canonicals keep users on the current URL but tell search engines where the authoritative version lives. Use 301 when a URL is permanently dead; canonical when both URLs should remain accessible.
Should I use canonical or hreflang for multi-region sites?
Both, but for different things. Each regional page has a self-canonical. Hreflang tags then tell Google that each canonical represents the same content in a different language/region. Never canonicalize a regional page to the English master.
Is canonical guaranteed to work?
Canonical is a strong hint, not a directive. Google sometimes picks a different canonical if they think yours is wrong (e.g., if you canonicalize to a page that's thinner or less linked). Check Search Console to see what Google actually selected.
What if my URL has tracking parameters?
Canonicalize to the clean URL without parameters. Google will still crawl the parameter version but consolidate signals to the canonical. This is the #1 reason every page needs a self-canonical — marketers add tracking params you didn't plan for.