One page, one address
Search engines treat each URL as a separate page. Add a tracking parameter, a trailing slash or a www, and you've created a new address with the same content. Ranking signals split across them.
A canonical tag tells Google which version you prefer. This generator takes any URL and gives you the clean one to put in that tag.
What the cleanup does
It strips UTM parameters and any custom ones you list. It forces HTTPS. You can choose to add or drop www, and add or remove the trailing slash. Pick one style and apply it across the site.
Fragments, the part after a hash, are dropped. Search engines ignore them for indexing anyway.
You also get a ready sitemap loc line, since the canonical and the sitemap entry should match exactly.
Canonical versus 301
A 301 redirect sends users and bots to a new address. A canonical is a hint. The visitor stays on the page they opened, and the search engine decides what to index.
Use a redirect when the old URL shouldn't exist. Use a canonical when both must stay live, such as a filtered product list or a campaign link.
Common mistakes
Cross-domain canonicals are allowed, and they're useful for syndicated content. But Google treats them as a hint, not an order.
- Pointing the canonical at a redirected URL
- Mixing http and https across pages
- Canonicalizing paginated pages to page one
- Setting a canonical to a page that returns an error
- Leaving tracking parameters in the tag
Keep it consistent
Match the canonical to your internal links, your sitemap and your redirects. When they all agree, crawlers trust the signal. When they don't, it gets ignored.
Check a few key pages after each release. Your URLs stay in your browser.