SEO ToolsA little help for every day

Search by name or task, such as JSON or percentage.

SEO Tools

Canonical URL Generator

Clean URLs into canonical form – https, www, trailing slash, tracking parameters, index.html and # fragments – then copy rel=canonical tags or Link headers.

View all tools
ResultUpdates as you type
<link rel="canonical" href="https://example.com/blog/seo-guide/?page=2">

Changes: http → https, dropped index.html, removed utm_source, utm_medium, removed #comments

Use one canonical per page in the <head>, with an absolute URL that loads directly (200 status, no redirect, no noindex).

How to use Canonical URL Generator

Paste one or more page URLs, one per line, and choose how to treat query parameters, protocol, www and trailing slashes. The canonical tags update as you type, with a list of every change made.

  1. Paste the page URLsEnter one URL per line, exactly as it appears, including tracking parameters or fragments.
  2. Set your URL rulesChoose which parameters to keep, https, www and trailing-slash handling, and whether to drop index.html or lowercase paths.
  3. Copy the canonical codeCopy link tags for HTML pages, the HTTP Link header for PDFs, or plain URLs for a spreadsheet.

What the generator cleans, with an example

Take http://Example.com/blog/seo-guide/index.html?utm_source=newsletter&utm_medium=email&page=2#comments. With the default settings it becomes https://example.com/blog/seo-guide/?page=2: http is upgraded to https, the host is lowercased, index.html is dropped, both utm_ parameters are removed and the #comments fragment goes, while page stays because it changes the content. Tracking parameters include all utm_ tags and click IDs such as gclid, fbclid and msclkid. Double slashes are merged too, and a note lists every change line by line.

Choosing the right canonical URL

A canonical tag tells search engines which URL you prefer when the same content is reachable at several addresses. Pick one form and use it everywhere: with or without www, with or without a trailing slash. The canonical URL must be absolute and load directly with a 200 status, without a redirect or noindex. Use one canonical per page. Only lowercase the path if your server treats /Shoes and /shoes as the same page; otherwise the canonical may point to a URL that returns 404. Search engines treat the tag as a strong hint rather than a command.

Accuracy and data handling

Generated tags and rules must match the real page content and the site's deployment environment. The calculation runs in your current browser; the tool code does not send the input to a processing API.

Often Used Together

Next step

FAQ

What is a canonical tag?

A link element with rel="canonical" in a page's head that names the preferred URL for that content. It helps search engines consolidate duplicates created by parameters, tracking codes or alternative paths.

Should the canonical URL keep query parameters?

Keep parameters that change the content, such as page or id, and drop tracking ones. Choose “Keep only those listed below” to keep just the parameter names you list, or remove them all.

Can I generate canonical tags for many URLs?

Yes. Paste one URL per line and each gets its own tag in the same order. Invalid lines are skipped with a message, and a warning appears if some URLs use www and others don't.

How do I add a canonical to a PDF?

Choose the HTTP Link header output. It produces a Link header with rel="canonical", which you add to the file's response headers in your server or CDN settings.

More SEO Tools

Related tools