SEO — Duplicate Content

Canonical Tag Generator

Build <link rel="canonical"> tags with URL normalisation, live validation, and bulk mode for multiple pages.

Page URL
Enter the canonical URL for this page
Normalisation Options
Strip specific params (comma-separated)
These parameters will be removed even if "Strip all" is off.
HTML — <head>
URL Anatomy
Validation
Canonical Best Practices
1
Self-referential canonicals — every page should have a canonical pointing to itself, not just duplicates.
2
Place in <head> — the tag must appear in the <head> section, not in <body>.
3
Use absolute URLs — always use full https://example.com/path URLs, never relative paths.
4
One canonical per page — multiple canonical tags on the same page will be ignored by Google.
5
Consistent with hreflang — if using hreflang, canonical and hreflang URLs must agree on the preferred version.
Bulk Canonical Generator One URL per line — same options as single mode apply
Input URLs (one per line)
Generated canonical tags

Normalisation options set in Single URL mode (Force HTTPS, Strip www, etc.) are applied to bulk output as well.

About This Tool

A canonical tag (<link rel="canonical" href="…"/>) tells search engines which version of a URL is the "master" copy when multiple URLs serve identical or near-identical content. Without one, Google may index the wrong version, split link equity across duplicates, or suppress your preferred page in favour of a crawled variant.

Common scenarios that require canonical tags: HTTP vs HTTPS, www vs non-www, trailing slash vs no trailing slash, URLs with and without query strings (filtering, sorting, pagination), print-friendly versions of pages, and syndicated content.

This tool generates the correct <link> tag and applies URL normalisation options — force HTTPS, strip www, remove query strings, strip fragments — so the canonical URL is always clean and consistent before you paste it into your <head>. Bulk mode lets you process a whole list at once.

How to Use

Single URL mode

  1. Paste your page URL (with or without https://) into the URL field.
  2. Toggle the normalisation options — Force HTTPS is on by default. Use "Strip specific params" to remove only tracking parameters like utm_source or fbclid.
  3. The canonical tag and URL anatomy panel update live.
  4. Check the validation list — fix errors before using the tag.
  5. Click Copy Tag to copy the full <link> element, then paste it into your page's <head>.

Bulk mode

  1. Switch to Bulk Mode via the tab at the top.
  2. Paste one URL per line into the left textarea.
  3. Click Generate Tags — all normalisation options from Single URL mode are applied.
  4. Click Copy All to copy the entire output.
Logic & Algorithm

URL normalisation is performed using the browser's native URL API to guarantee RFC-compliant parsing:

Processing pipeline

  1. Scheme injection — if no http(s):// is present, https:// is prepended. If Force HTTPS is on, existing http:// is replaced.
  2. www stripping — removes the www. prefix from hostname.
  3. Fragment removal — clears URL.hash (fragments are never sent to the server and Google ignores them in canonicals).
  4. Query handling — either clears URL.search entirely (Strip all), or uses URLSearchParams.delete() to remove only the specified parameter names.
  5. Trailing slash — removes trailing / from pathname unless the path is exactly / (root).
  6. Output — calls URL.href to produce the final normalised URL. The & and " characters are HTML-escaped before embedding in the href attribute.

Validation checks

  • Error — URL cannot be parsed.
  • Warning — HTTP protocol; query string present; fragment present; tracking parameters detected; mixed case in URL; double slashes in path.
  • Info — non-default port number present.
Related Tools
Learn More About Canonical Tags
SEO Guide
Canonical Tags Explained: How to Fix Duplicate Content
A complete guide to rel=canonical — what it does, when to use it, common mistakes, and how Google actually treats canonical hints vs directives.
June 20269 min read
SEO
Duplicate Content: The Complete SEO Guide
Understand how Google handles duplicate and near-duplicate content, what the real ranking impact is, and all the tools you can use to resolve it.
May 202611 min read
International SEO
Hreflang + Canonical: How They Work Together
When you have multilingual or multi-regional content, hreflang and canonical must align. Learn the rules and common pitfalls to avoid mixed signals.
April 20268 min read