Canonical Tag Generator
Turn any page URL into a clean canonical URL, see exactly what changed, and copy the rel="canonical" link tag or HTTP header. Paste a whole list for bulk mode. Runs entirely in your browser.
Normalization rules
Host names are always lowercased and default ports (:80 for http, :443 for https) removed, because browsers treat them as identical. Tracking parameters removed: utm_*, gclid, gbraid, wbraid, dclid, fbclid, msclkid, yclid, ttclid, twclid, igshid, mc_cid, mc_eid, _ga, _gl, _hsenc, _hsmi, mkt_tok, srsltid and similar.
How to use the Canonical Tag Generator
- Paste the page URL, for example one copied from your browser with tracking parameters.
- Set the rules to match your site: https, www or not, trailing slash, which parameters to strip.
- Press Generate canonical tag and check the before / after comparison and the list of changes.
- Copy the tag into the page's
<head>, or the HTTP header for PDFs and other files. - Switch to Bulk URLs to clean a list of URLs at once, then copy the tags or download a CSV.
What each normalization rule does
| Rule | Before | After |
|---|---|---|
| Force https | http://example.com/a | https://example.com/a |
| Remove www | https://www.example.com/ | https://example.com/ |
| Lowercase host, default port | https://Example.COM:443/ | https://example.com/ |
| Remove index file | /blog/index.html | /blog/ |
| Collapse double slashes | /shop//shoes/ | /shop/shoes/ |
| Trailing slash: add | /about | /about/ (files like /a.pdf are left alone) |
| Remove tracking parameters | ?utm_source=x&id=7&gclid=abc | ?id=7 |
| Sort parameters | ?size=42&color=red | ?color=red&size=42 |
| Drop fragment | /faq#shipping | /faq |
Path case is left alone by default because most web servers treat /Page and /page as different URLs. Only turn on Lowercase path if your server really serves the same content for both.
Canonical tag checklist
- Absolute URL: always include https:// and the host. Relative canonicals work in theory but are easy to break.
- One canonical per page, placed in the
<head>. Multiple or conflicting canonicals are ignored. - Point to a 200 page: not to a redirect, a 404, a noindex page or a URL blocked by robots.txt.
- Be consistent: internal links, the XML sitemap, hreflang tags and redirects should all use the same canonical form.
- Do not canonicalize paginated pages to page 1; each page of a series has different content and should be self-canonical.
- Use redirects for real moves. A canonical keeps both URLs accessible; a 301 redirect, which you can build with the htaccess redirect generator, retires the old one.
Canonical vs redirect vs noindex
Use a 301 redirect when an old URL should no longer be visited at all, for example after switching from http to https or from www to non-www. Use a canonical tag when duplicate URLs must keep working for visitors, such as tracking links from campaigns built with the UTM builder, filtered category pages or printer-friendly versions. Use noindex for pages that should not appear in search at all. Do not combine noindex with a canonical that points to another page, because the signals contradict each other.
Frequently asked questions
What is a canonical tag?
A canonical tag is <link rel="canonical" href="…"> in a page's head. It tells search engines which URL is the main version when the same content is reachable at several addresses, for example with and without www, with tracking parameters, or with sorting options. Search engines then consolidate ranking signals on that URL.
Should every page have a self-referencing canonical?
Yes, it is a widely recommended practice. A page whose canonical points to its own clean URL protects it from duplicates created by tracking parameters, session IDs or scrapers. Pages that are duplicates of another page should point to that other page instead.
Should the canonical URL have a trailing slash?
Either is fine, but be consistent and match what your server actually serves without a redirect. If /page/ and /page both work, pick one, redirect the other with a 301, and use the chosen form in canonical tags, internal links and the sitemap.
Which URL parameters should be removed?
Remove parameters that do not change the content: campaign tags (utm_source, utm_medium and so on), ad click IDs (gclid, fbclid, msclkid), session IDs and sort orders. Keep parameters that select different content, such as ?page=2 for paginated lists or ?id=42 when the ID selects the product.
Is a canonical tag a directive?
No, it is a strong hint. Google may choose a different canonical if signals conflict, for example if the canonical URL redirects, is blocked by robots.txt, is noindexed, or if internal links and the sitemap point elsewhere. Make all of these consistent.
When do I use the HTTP header instead?
Use the HTTP Link header for files that have no HTML head, such as PDFs: Link: <https://example.com/guide.pdf>; rel="canonical". Configure it in your web server or CDN for that file.