🛠️

Canonical URL Generator

Generate the exact rel="canonical" tag for any URL, with the right format, escaping, and protocol. Copy-paste ready for your <head>.

Canonical URL Generator
Paste any URL and get the exact <link rel="canonical"> tag plus a sanity check on the URL itself.
Use the absolute, https, parameter-stripped version of the URL.
What it does

Generate copy-paste-ready canonical tags, done right

Most "canonical generators" just wrap your URL in a tag and call it done. This one handles the edge cases that actually break canonicalisation: non-ASCII characters in URLs, query parameter ordering, http vs https normalisation, trailing slash decisions, and cross-domain canonical syntax.

Paste the URL you want to canonicalise. The generator returns the correctly-formatted tag plus a 30-second sanity check explaining why this URL is the right canonical (or warning you if it might not be).

The 5-rule canonical decision framework

Which URL should be your canonical? Use this framework

  1. Pick the URL with the cleanest, shortest path. Strip tracking parameters (utm_*, fbclid, gclid, etc.), they should never be in a canonical.

  2. Pick https over http. Always.

  3. Pick the version most of your internal links point to. Use Screaming Frog or Ahrefs to check.

  4. Pick the version your XML sitemap lists. If they disagree, fix the sitemap or the canonical to match.

  5. Pick the version that has the most external backlinks. Use Ahrefs Site Explorer → "Top pages" filtered by URL pattern.

When all five point to the same URL, that's your canonical. When they conflict, you have a consolidation problem to fix BEFORE setting the canonical.

Frequently asked

FAQs about the Canonical URL Generator

Inside the <head> of your HTML, before the closing </head> tag. Most CMSs have a "Canonical URL" field per post or page, that's the right place. If you set it via a meta plugin and your theme also adds one, you'll get duplicate canonicals.
Never. UTM parameters are for campaign tracking, they create unique URLs for each campaign that you do NOT want indexed. The canonical should always point to the parameter-stripped, clean URL.
No, that was the old advice. Google now recommends self-referencing canonicals on paginated pages (each page references itself), combined with rel="next"/"prev" if you want to signal sequence. Canonicalising page 2 to page 1 hides page 2's content from indexing.
Yes, useful for non-HTML content like PDFs. Send a Link header: Link: <https://canonical-url>; rel="canonical". Most servers (Nginx, Apache) can be configured to inject this.
They serve different purposes. Canonical is for search engines. og:url is for social sharing (Facebook, LinkedIn, Twitter). Best practice is to set both to the same URL.
You don't need to. Self-referencing canonicals are the safe default. Only override them if you specifically need to canonicalise to a different URL (parameter cleanup, syndication, etc.).
Beyond tools
Need an audit, not a checker?
These tools spot problems. I solve them. Book a free strategy call, I'll review your site live and give you a prioritised fix list.