BV
All tools
seo

Canonical Tag Generator

Generate a correct rel=canonical tag from any URL. Normalises the scheme, strips tracking parameters, resolves trailing slash and case issues, and warns about the canonical mistakes that quietly deindex pages.

Muhammad Bilal
Muhammad Bilal Virk
4 min read
Canonical URL generator
Parameters stripped
3
Length
36 chars
Changed?
Yes
Canonical URL
https://example.com/blog/post?page=2
Head tag
<link rel="canonical" href="https://example.com/blog/post?page=2" />
HTTP header (for PDFs and other non-HTML files)
Link: <https://example.com/blog/post?page=2>; rel="canonical"
A canonical is a hint, not an instruction — Google ignores it when the two pages are obviously different. Three rules make it stick: the canonical URL must return 200 rather than a redirect, every page should carry a self-referencing canonical even when there is no duplicate, and the URL in the tag must match the one in your sitemap character for character. A sitemap listing the trailing-slash version while the tag drops it is a conflicting signal.

A canonical tag pointing at the wrong URL is worse than no canonical tag at all — it tells Google to drop the page you wanted ranked. Paste a URL and this tool returns a normalised, absolute canonical tag plus a plain warning about anything that looks wrong.

What this tool does

Paste any URL and it returns a ready-to-use <link rel="canonical"> tag with the URL normalised: scheme forced to https, host lower-cased, tracking parameters removed, trailing slash made consistent, fragments dropped. It also lists what it changed and why, so the normalisation is a lesson rather than a black box.

Alongside the link tag it produces the HTTP Link: header equivalent, which is how you canonicalise a PDF or any other non-HTML resource.

A worked example

Paste HTTP://Example.com/Blog/My-Post/?utm_source=newsletter&utm_medium=email&ref=twitter#intro.

You get back https://example.com/blog/my-post/ and a list of five changes: scheme upgraded, host lower-cased, path lower-cased with a note that path case is server-dependent, three tracking parameters stripped, fragment dropped. The fragment matters — a canonical that includes #intro is treated as pointing at a different URL, and it is a surprisingly common copy-paste error.

Parameters that are stripped by default

Parameter Origin
utm_source, utm_medium, utm_campaign, utm_term, utm_content Campaign tagging
gclid, gbraid, wbraid Google Ads
fbclid Meta
msclkid Microsoft Ads
ref, source Referral tagging

Functional parameters — the ones that change what the page shows, such as a product variant or a page number — are kept, because stripping them would canonicalise genuinely different pages onto one.

Where people go wrong

Canonicalising every paginated page to page one. Page two of a listing is not a duplicate of page one; it contains different items. Canonicalise each page to itself. Google removed its rel=next/rel=prev support years ago and now expects self-referencing canonicals on paginated series.

Site-wide canonical to the homepage. A template bug that emits the same canonical on every page effectively tells Google the site is one page. It happens more often than it should, usually after a theme change, and the traffic loss is total.

Canonicalising to a URL that redirects or 404s. The target must be a live 200. A canonical pointing at a redirect is a conflicting signal, and Google's documentation on consolidating duplicate URLs is clear that it treats canonicals as a hint it may override when the signals disagree.

Mixing canonical and noindex on the same page. These are contradictory instructions — one says "consolidate onto this other page", the other says "drop this page". Pick one.

Cross-domain canonicals used casually. They are valid and useful for syndicated content, but they hand ranking authority to the target domain. Use them deliberately, not as a tidying habit.

FAQ

Should a page canonicalise to itself?

Yes. A self-referencing canonical on every indexable page is the standard, and it protects you against parameterised versions of the same URL being indexed separately.

Does a canonical guarantee Google follows it?

No. It is a strong hint, not a directive. Google weighs it against internal links, sitemap entries, redirects and hreflang. Contradict yourself and it picks for you.

Absolute or relative URL?

Absolute, always, including the scheme and host. Relative canonicals technically resolve but break the moment the page is served from a staging domain or scraped.

What about ?page=2 and filter parameters?

Self-canonical for real pagination. For filters that produce genuinely duplicate result sets, canonicalise to the unfiltered view. For filters that produce a distinct, useful page, treat it as its own page.

Can I canonicalise a PDF?

Yes, using the HTTP Link: header rather than a tag, since a PDF has no head to put a tag in. The tool generates that header for you.

Next steps

If you run multiple language versions, the canonical and hreflang sets must agree — build them together with the hreflang generator. Check the rest of the head with the SEO Meta Tag Analyzer, and when you are consolidating old URLs, generate the rules with the redirect generator.

Migrating a site and worried about what it does to the pipeline behind it? What Is Workflow Automation is a useful primer on mapping the process first.

The link relation itself is specified in RFC 6596, which is worth a skim if you are arguing with a developer about whether a canonical is a directive or a hint. It is a hint, and search engines treat it as one — which is why the rest of the signals on the page have to agree with it.

Need someone to own the migration? Book a discovery call.

Muhammad Bilal
Muhammad Bilal Virk
AI automation engineer — building agents, workflows, and RPA that remove repetitive work.
Share
Newsletter

One email, when I ship something worth reading.

No cadence, no filler. Unsubscribe any time.

Free consultation

Want this built against your real numbers?

A 30-minute call to scope the workflow, agent, or automation you actually need.

Book a free consultation

More seo tools

All tools
Next step

Have a workflow that's burning hours every week?

Bring me one real bottleneck. I'll tell you whether it's worth automating, and what it would take.

Book 30 Minutes Call