Skip to content
Processing locally — files never leave your device

Canonical Tag Generator

Build a clean rel="canonical" link tag for any URL. Strip tracking parameters and normalize trailing slashes.

How to use Canonical Tag

  1. Paste the full URL of the page — including any tracking or session parameters.
  2. Toggle the cleanup rules you want: force HTTPS, lowercase the host, strip UTM and other tracking parameters.
  3. Review the normalised URL the tool produces and confirm it is the version you actually want indexed.
  4. Copy the full <link rel="canonical" href="..."> tag.
  5. Paste it into the <head> of the page, before the closing </head>, and deploy.

Canonical tags: how to stop duplicate-content dilution

A canonical tag is a single line of HTML that tells search engines which URL is the master copy of a page. Most websites unintentionally serve the same content at several addresses, and without a canonical the ranking signals for that content get split across all of them. This tool normalises a URL and wraps it in a valid rel="canonical" link tag you can drop straight into your page head.

What the tag looks like

<link rel="canonical" href="https://example.com/blog/post" />

It belongs inside the <head> element. You can also send the equivalent signal in an HTTP response header (Link: <...>; rel="canonical"), which is the only option for non-HTML files such as PDFs.

Why duplicate URLs happen

The same page is commonly reachable at more than one URL because of:

  • www vs non-www, and http vs https variants of the host
  • Trailing-slash and no-trailing-slash versions of the same path
  • Tracking parameters like ?utm_source=... appended by campaigns
  • Faceted navigation and sort orders that add query strings
  • Session IDs, print views, and pagination of a single article

To a crawler each of these is a distinct URL. The canonical tag consolidates them so link equity and indexing focus on one version.

Canonical vs 301 redirect vs noindex

These three tools solve overlapping problems and are easy to confuse. A 301 redirect permanently sends both users and crawlers to another URL — use it when the duplicate should not exist at all. A canonical keeps both URLs live and accessible to users while telling search engines which to index — use it for tracking-parameter and faceted variants you still need to serve. A noindex tag keeps a page out of the index entirely — use it for thin pages that should never rank, not for consolidating duplicates.

Common canonical mistakes

  • Pointing every page on the site at the homepage (a frequent template bug)
  • Canonicalising to a URL that redirects or returns a 404
  • Mixing relative and absolute forms, or letting the host casing differ
  • Emitting two canonical tags, which makes Google ignore both
  • Letting the sitemap list one URL while the canonical names another

Verifying it worked

After deploying, use Google Search Console's URL Inspection tool. It reports both the user-declared canonical (the one in your tag) and the Google-selected canonical (the one Google actually chose). When these differ, your other signals — internal links, sitemap, hreflang — are outvoting your tag and need to be brought into line.

Related SEO tools

  • Meta Tag Generator — build the full head block, including the canonical, in one pass.
  • XML Sitemap Generator — keep sitemap URLs consistent with your canonicals.
  • robots.txt Generator — control crawling without accidentally blocking canonical targets.
  • Slugify — produce clean, lowercase URL slugs that are easy to canonicalise.

Frequently asked questions

What does the canonical tag do?
It tells search engines which URL is the preferred (canonical) version when the same or very similar content is reachable at multiple URLs — for example with and without www, http vs https, with and without a trailing slash, or with tracking query strings appended.
Should the canonical URL be absolute?
Yes. Always use a fully qualified absolute URL including the protocol, e.g. https://example.com/page. Relative canonicals are technically allowed but ambiguous and a common source of mistakes — Google resolves them against the current page, which can produce the wrong result on paginated or filtered URLs.
Can a page be its own canonical?
Yes, and it usually should be. A self-referencing canonical on every page is a recommended best practice. It removes ambiguity for crawlers and protects against scrapers who copy your page without changing the tag.
What about cross-domain canonicals?
They are allowed. If you syndicate an article to another domain, point the copy back to the original with rel="canonical". Google generally honours this and consolidates ranking signals to the original URL.
Is rel=canonical a directive or a hint?
It is a hint, not a hard directive. Google treats it as a strong signal but may choose a different canonical if other signals (internal links, sitemap entries, redirects, hreflang) disagree. Keep all of those signals consistent to get the result you want.
Can I have more than one canonical tag on a page?
No. Multiple conflicting rel="canonical" tags cause Google to ignore all of them. Output exactly one canonical per page. Also avoid setting it both in the HTML head and in an HTTP Link header with different values.
Should the canonical point to a noindex or redirected URL?
No. The canonical should point to a 200-status, indexable URL. Pointing it at a page that is noindexed, blocked by robots.txt, or that 301-redirects elsewhere sends contradictory signals and is frequently flagged in Search Console.
Does the canonical have to exactly match the live URL?
It should match the resolved URL Google will actually fetch — same protocol, host casing, and path. Even a trailing-slash difference creates two distinct URLs, so normalise consistently across your links, sitemap, and canonical tags.

More tools you might find useful in the same flow.

Built by Muhammad Tahir · About