EthicalFusion

Canonical URL Generator

Generate a canonical link tag from any URL.

Was this tool helpful?

Thanks for the feedback!

Canonical URL Generator turns a messy page address, full of tracking parameters, filters or fragments, into a clean <link rel="canonical"> tag. The tag tells search engines which version of a page you prefer, so duplicates created by campaign links, sorting options or session IDs don't compete with the main page.

How the address is cleaned

Paste a full URL, including http:// or https://, and press Generate. The tool:

  1. lowercases the domain name,
  2. removes everything after ?, including UTM tags and all other parameters,
  3. removes any #fragment,
  4. removes a trailing slash from the path,
  5. and keeps the path's capitalisation exactly as it was.

For example, https://Example.com/Shoes/Running/?utm_source=insta&color=red#reviews becomes:

<link rel="canonical" href="https://example.com/Shoes/Running">

Addresses without a scheme, such as example.com/page, are rejected as invalid.

Check the result against your real URLs

The clean-up follows fixed rules, so review the tag before using it:

  • Parameters that define the page. On sites where the content depends on a parameter, like product.php?id=42, the tool returns product.php. Using that tag would point every product at one address. Add the parameter back in such cases.
  • Trailing slashes. Many sites, including WordPress by default, use addresses ending in / and redirect the version without it. If yours does, add the slash back so the canonical points to the URL that actually loads, not to one that redirects.
  • Protocol and www. The tool keeps http and www exactly as entered. Make sure the tag uses the version your site redirects to, normally https.

Where the tag goes and how Google treats it

Place the tag in the <head> of the duplicate pages and, as a self-referencing canonical, on the preferred page itself. Use one canonical tag per page with an absolute URL, as Google recommends. SEO plugins like Yoast and Rank Math output a canonical automatically, so check the page source first to avoid ending up with two conflicting tags.

A canonical is a hint, not a command. Google weighs it together with redirects, internal links and sitemaps, and may select a different URL if the signals disagree. Search Console's URL Inspection report shows both the canonical you declared and the one Google chose.

Canonical, redirect or noindex?

  • Use a canonical when both versions must keep working for visitors, such as a product reachable through several filtered or tracked URLs.
  • Use a 301 redirect when the old address shouldn't be used at all; the 301 Redirect Generator writes the rule.
  • Use noindex for pages that shouldn't appear in search results at all, such as internal search results.

Paginated pages (page 2, page 3 of a category) should each have their own self-referencing canonical rather than all pointing to page 1. Keep campaign tags from the UTM Link Builder out of the canonical, which is exactly what this tool strips.

Frequently asked questions

What does a canonical tag do?
It tells search engines which URL is the preferred version when the same or very similar content is available at several addresses.
Why did the tool remove my trailing slash?
It always strips a trailing slash from the path. If your site's pages end with a slash, add it back so the canonical matches the URL that actually loads.
Should every page have a self-referencing canonical?
It's a good practice. A canonical tag pointing to the page's own clean URL protects it from duplicates created by tracking or sorting parameters.
Can I canonicalise a page to a different domain?
Yes, cross-domain canonicals are allowed, for example when an article is republished on another site. Google treats it as a hint in the same way.
Why did Google choose a different canonical from mine?
Other signals, such as redirects, internal links or sitemap URLs, may point to another version. Make them all consistent with your canonical tag.

Related tools

Embed this tool on your site

Paste it into any blog or website. Free, with a credit link.