Canonical URL Generator
Build the canonical URL for any page and get a drop-in <link rel="canonical"> snippet. Lowercases the host, strips default ports, removes UTM/tracking params, forces HTTPS, and de-duplicates query parameters.
Interactive tool
Input
Output
Enter a URL above to build its canonical form.
What is the Canonical URL Generator?
A free tool that takes any URL and returns its canonical form along with a drop-in <link rel="canonical"> snippet. The canonical URL is the one address you want Google to credit when several variants point to the same page (http vs https, ?utm_source vs no UTM, query-string parameter order differences, trailing-slash variants, fragment hashes, and so on).
How to Use the Canonical URL Generator
- 1Paste the URL of the page you want to canonicalise
- 2Optionally toggle the normalisation rules: force HTTPS, strip UTM/gclid/fbclid, sort query parameters, strip fragments
- 3Optionally list alternate-locale URLs to check for reciprocity warnings
- 4Copy the canonical URL or the full <link rel="canonical"> tag
- 5Paste the tag into the <head> of every variant of the page
Key features
Smart defaults
The canonical preset already forces HTTPS, strips tracking params, dedupes query keys, sorts alphabetically, and strips fragments.
Per-rule toggles
Override any rule when you have a good reason: keep UTM params, leave the fragment, preserve declared query order.
Drop-in tag
Copy the full <link rel="canonical" href="..."> snippet with proper HTML-attribute escaping.
Reciprocity warnings
Add alternate-locale URLs and the tool flags any that canonicalise to the same URL (and would silently break hreflang reciprocity).
Live diff
See exactly which normalisation rules fired so you can explain the canonical to a teammate or stakeholder.
Runs in your browser
No data ever leaves your device: the entire generator is client-side.
Why does the canonical URL matter?
Search engines deduplicate identical pages by URL. Without a canonical tag, Google has to guess which variant is the primary one, which can split your ranking signal across several URLs (or worse, choose the wrong one). A canonical tag concentrates link equity on one preferred URL and gives crawlers an explicit answer.
Common use cases
- Picking the HTTPS variant when an older mirror still serves HTTP
- Stripping UTM and gclid parameters from campaign landing pages so they consolidate with the organic URL
- Choosing the trailing-slash variant your CMS prefers and forcing it everywhere
- Deduping query-parameter order differences (?a=1&b=2 vs ?b=2&a=1)
- Anchoring pagination so /blog and /blog?page=1 collapse into one canonical
Canonical vs redirect
- A canonical tag tells Google which URL to credit. It does not change what the browser sees. The duplicate URLs stay reachable and continue serving content normally.
- A 301/308 redirect physically moves the user to the canonical URL. Use it when the duplicate URL has no reason to keep existing.
- Use a canonical when both URLs must remain accessible (e.g. ?utm_source links you cannot strip server-side, or http→https fallbacks).
Self-referential canonicals
A canonical that points back to the page itself is a feature, not a bug. It tells Google "this is the preferred URL for this content" and prevents accidental aliasing from another page declaring you as a duplicate.
Tips & best practices
One canonical per page
Multiple <link rel="canonical"> tags inside the same <head> confuse Google. Pick one and move on.
Use absolute URLs
Relative canonicals (href="/path") are technically valid but error-prone across protocol or subdomain variants. Always use https://...
Match what the user sees
The canonical URL should serve identical content. Pointing /us/page to /uk/page when the content differs is a soft mismatch and Google often ignores it.
Pair with hreflang for multilingual sites
Every alt-language page should self-canonicalise and reciprocally reference the others via hreflang. The Zap.Tools Hreflang Generator handles the matrix.
Privacy & security
This tool runs entirely in your browser. URLs never leave your device.
Related tools
- Robots.txt Generator
Build a robots.txt file with a per-rule editor: pick user-agents, Allow/Disallow patterns, crawl-delay, sitemaps, and the optional host directive. Three starter presets and live validation.
SEO Tools
- XML Sitemap Generator
Build a sitemaps.org-conformant XML sitemap from a URL list. Auto-paginates at 50,000 URLs or 45 MB, generates a wrapping sitemap-index, downloads as a single file or a multi-file ZIP.
SEO Tools
- CSP Generator
Build a Content-Security-Policy with a per-directive visual editor. Outputs the header form and the <meta http-equiv> form, with live evaluation against Google CSP Evaluator heuristics.
SEO Tools
- UTM Builder
Build trackable campaign URLs with UTM parameters for Google Analytics, GA4, and other tracking tools
SEO Tools
- CSP Evaluator
Audit a Content-Security-Policy for unsafe directives, wildcards, missing object-src/base-uri, weak nonces, and other XSS escape hatches. Paste a policy or fetch a URL: get severity-grouped findings with remediation.
SEO Tools
- HTTP Header Checker
Inspect every response header from any URL: security (HSTS, CSP, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy, COOP/COEP/CORP, cookie flags), performance (Cache-Control, ETag, compression), and the full redirect chain.
SEO Tools
Frequently Asked Questions
What does a canonical URL do?
A canonical URL tells search engines which version of a page should be credited when several URLs serve the same content. It consolidates ranking signals on one preferred URL.
Should I use a canonical or a 301 redirect?
Use a 301 redirect when the duplicate URL has no reason to exist. Use a canonical when both URLs must remain reachable (e.g. UTM-tagged variants, http/https mirrors, or product pages with optional filters).
Can a page canonicalise to itself?
Yes: a self-referential canonical is recommended. It pre-empts other pages from claiming yours as a duplicate.
Is the canonical tag a directive or a hint?
A hint. Google treats canonical as a strong signal but may override it if the canonical target is irrelevant or unreachable. Always pair with consistent internal linking.
Does the canonical URL need to be absolute?
Yes. Always use full https:// URLs. Relative canonicals are technically valid but error-prone across protocol or subdomain variants.