Canonical URL Builder

Turn messy URLs into one clean canonical address. Paste a URL — or a whole list — and the builder forces https, applies your www and trailing-slash rules, strips tracking parameters like utm_source and gclid, sorts the rest, and gives you the rel="canonical" tag and Link header, with every change explained.

Before and after

OriginalCanonical
http://Example.com/shop/index.html?utm_source=x#tophttps://example.com/shop/
https://ex.com/p?b=2&gclid=1&a=1https://ex.com/p?a=1&b=2

When to use it

  1. Fix duplicate-content issues from tracking parameters.
  2. Generate canonical tags for templates.
  3. Clean URL lists before importing into a sitemap.
  4. Set canonical headers for PDFs.

How to Use

  1. Paste one or more URLs.
  2. Choose www, slash and parameter rules.
  3. Copy the canonical URL and tag.

Features

  1. Tracking-parameter removal
  2. www and slash rules
  3. Parameter sorting
  4. index file removal
  5. Tag and Link header
  6. Batch CSV

FAQs

What is a canonical URL?

The preferred address of a page when the same content is available at several URLs.

Should canonical URLs include parameters?

Only ones that change the content, like ?page=2. Tracking parameters should be removed.

With or without trailing slash?

Either — pick one, use it everywhere, and redirect the other.

Can I canonicalize PDFs?

Yes, with the Link HTTP header.

Can I process many URLs?

Yes, one per line, with CSV export.

Technical Details

Each URL is parsed with the browser's URL API and normalized in a fixed order: - **Scheme and host:** https is forced, www is added or removed per your rule, default ports (:80, :443) are dropped, and the host is lowercased. - **Fragment:** any #fragment is removed. - **Parameters:** tracking parameters are stripped (all utm_*, gclid, gbraid, wbraid, fbclid, msclkid, mc_cid, _ga, _gl, srsltid and others). Optionally every other parameter goes too, except those on a keep-list. The rest can be sorted, so ?b=2&a=1 and ?a=1&b=2 become one URL. - **Path:** repeated slashes are collapsed, index.html or index.php is removed, and the trailing slash is added or removed (never on file names like .pdf). The path can be lowercased. Every change is listed. Paste many URLs, one per line, to batch-convert and export CSV. Output includes the link rel=canonical tag and the HTTP Link header for non-HTML files.

SEO Tools

SEO Tools

  • Heading Structure Checker
  • Image Alt Text Auditor
  • Robots Meta Tag Generator
  • Sitemap Inspector
  • Robots.txt Generator
  • Keyword Density Checker
  • SERP Snippet Checker
  • Hreflang Generator