serps.io
All free tools

Technical

Canonical Tag Generator

One address per page, written the same way every time

In build

Paste a set of URLs and get the rel=canonical tag for each, with tracking parameters, session IDs, trailing slashes, uppercase paths and index filenames resolved to a single absolute address, plus the HTTP header form for PDFs and other non-HTML files.

Get early access

What it returns

  • One absolute rel=canonical URL per input, with protocol, host casing and trailing slash normalised to a single consistent form.
  • The parameters stripped and the parameters kept, listed separately, so a filter or page value that genuinely changes the content is not discarded along with the tracking.
  • The tag in both forms: a link element for the head, and an HTTP Link header for PDFs, images and anything else with no head to put it in.
  • A warning for the cases that defeat a canonical: a target that redirects, a page canonicalising to a blocked or noindexed URL, a self-reference that does not match the URL being served.

When this matters

A campaign sends traffic to the same article under four different tracking strings, the CMS also serves it with and without a trailing slash, and the print view is a fifth URL. Nothing is wrong on any single one of them, and the page still underperforms, because its signals are split five ways and the version Google chose to index is the one with the tracking string in it. A self-referencing canonical, generated the same way every time, is what collapses those back into one page.

How to answer this today

Site audit reports what the live site is doing: pages with no canonical at all, pages canonicalising to a redirect or a blocked URL, and clusters where several URLs serve the same content and disagree about which is primary. That is the diagnosis. Producing the correct tag for a template you are about to deploy is this tool's job.

Site audit

Why this is harder than it looks

It is a suggestion

A canonical is one signal among several, weighed against internal links, sitemaps, redirects and the version users are actually sent to. A perfectly formed tag can be overruled, and when it is, that is usually a sign the other signals disagree with it.

Chains and loops

A canonical pointing at a URL that redirects, or at a page that points back, leaves the engine to guess. The target has to be the final address that returns a 200, which means resolving redirects before the tag is written rather than after.

Not a substitute for a redirect

A canonical keeps both URLs reachable and asks for one of them to be credited. If the duplicate should not exist, the answer is a 301, and using a canonical to paper over a structural problem leaves the problem in place.

Cross-domain and syndication

Pointing a canonical at another domain is legitimate for syndicated content and a fast way to deindex yourself when the target is wrong. Anything that writes a cross-domain canonical has to be explicit that the page is handing credit away.