How to use the canonical URL generator
- 1Paste one or more Page URLs, one per line.
- 2Set the Normalization rules: www, Trailing slash and Query parameters (add any parameter to Always keep these parameters if it changes the content).
- 3Pick the Output: a
<link>tag, an HTTP header or the bare URL. Each line shows what was changed. - 4Press Copy and add the tag to the page's
<head>(or the header in your server configuration).
Example (www: Add, Trailing slash: Add, Remove tracking)
http://Example.com/Shoes/index.html?utm_source=news&color=red&gclid=abc#reviews example.com/blog/post
<link rel="canonical" href="https://www.example.com/Shoes/?color=red"> Changed: http → https; added www; removed #fragment; removed utm_source, gclid; removed index file <link rel="canonical" href="https://www.example.com/blog/post/"> Changed: added www; added trailing slash
color=red is kept because it isn't a tracking parameter: it may show different products. Choose Remove all if your parameters never change the content.
What a canonical tag tells search engines
<link rel="canonical" href="…"> says "of all the URLs that show this content, this is the one to index". It consolidates signals such as links from duplicates into the chosen URL. It's a strong hint, not an order: Google also weighs redirects, internal links, sitemaps and HTTPS when choosing the canonical, so keep those consistent with the tag.
Self-referencing canonicals
Every indexable page should usually point its canonical at its own clean URL. That way, when someone links to ?utm_source=newsletter or a session ID gets appended, the variants still consolidate to the right address. Generate the canonical from the page's preferred URL, not from whatever URL the visitor arrived at.
Parameters, trailing slashes and www
Search engines treat each of these as a different URL: http:// and https://, with and without www., with and without a trailing slash, different upper and lower case in the path, and any change in the query string. The generator's rules pick one version of each:
- Remove tracking strips
utm_*,gclid,fbclid,msclkid,mc_cidand similar click identifiers. - Remove all drops every parameter except those you list to keep (pagination or product IDs).
- Fragments (
#reviews) are always removed; they never reach the server. - File URLs such as
guide.pdfnever get a trailing slash.
HTTP header canonicals for PDFs
PDFs, images and other files have no <head>, so the canonical goes in the HTTP response instead: Link: <https://www.example.com/guide.pdf>; rel="canonical". Use it when the same PDF is available at several URLs, or to point a PDF at the HTML page with the same content. Set it in your server configuration (Apache Header add Link, Nginx add_header Link).
Canonical vs redirect vs noindex
| Situation | Use |
|---|---|
| Old URL replaced by a new one | 301 redirect |
| Variants that must stay reachable (tracking, sort order, print view) | Canonical to the main URL |
| Page that shouldn't appear in search at all | noindex |
| http/https or www/non-www versions | 301 redirect, plus canonicals |
Don't combine noindex and a canonical on the same page: one says "don't index", the other "index that one instead".
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
