What Is a Canonical URL? A Plain-English Guide to Fixing Duplicate Content
What a canonical URL is, why duplicate content quietly hurts your rankings, and exactly how to set the rel=canonical tag so Google indexes the page you actually want.
Paste a page URL and get a normalised, self-referencing rel=canonical tag with the tracking noise removed, plus the HTTP Link header and Next.js, WordPress and plain-HTML snippets, previewed live and generated entirely in your browser.
The Canonical URL Generator normalises any page URL, fixing scheme and host casing, tidying the path and stripping UTM and tracking parameters, then outputs a rel=canonical link tag, HTTP Link header and Next.js, WordPress and plain-HTML snippets. A before/after diff shows what changed. Free, runs locally, no URLs uploaded.
The GigAI Canonical URL Generator turns any page address into a single, authoritative canonical URL and the exact `<link rel="canonical">` tag search engines expect. Duplicate-content problems almost always come from the same page being reachable at many URLs, http vs https, www vs bare domain, trailing slashes, uppercased paths, and a long tail of ?utm_*, ?fbclid, ?gclid and session parameters. This tool normalises all of that in one pass: it forces a consistent scheme and host casing, tidies the path, drops the default port and the fragment, and lets you sort or strip query parameters so tracking junk never becomes your canonical. It shows a clear before/after diff of what changed and why, then hands you the canonical link tag, the equivalent HTTP `Link: <…>; rel="canonical"` header, and copy-paste snippets for Next.js metadata, a WordPress/PHP head and a raw HTML `<head>`. Because canonicalization is a subtle art, the tool also explains when a self-referencing canonical is right, when to point elsewhere (paginated series, syndicated content, filtered listings), and the mistakes that make Google ignore your hint. Everything runs locally with the browser's native URL parser, so unpublished URLs, staging hosts and internal campaign links never leave your machine, are never logged, and vanish when you close the tab.
Last updated
Drop in the absolute URL of the page you're canonicalizing, include the https:// scheme. A sample loads if you just want to see it work.
Toggle host lowercasing, trailing-slash handling, fragment removal, query sorting and tracking-parameter stripping until the canonical reads exactly how you want it stored.
Check the diff to confirm the changes are intentional, and read the removed-parameter list so nothing important gets dropped.
Copy the `<link rel="canonical">` tag, the HTTP Link header, or a framework snippet, or download it, and drop it into every URL variant of the page.
Enter a URL and get a correct, escaped `<link rel="canonical" href="…">` tag plus the matching HTTP Link header, copy either, or download the snippet.
Lowercases the host, enforces a consistent scheme, tidies the path, drops the default port and the #fragment, and optionally sorts query keys, one deterministic canonical every time.
Remove utm_*, gclid, fbclid, mc_cid, ref and other analytics junk in one click so a shared, tagged link never becomes the URL you tell Google to index.
See exactly what normalisation changed (scheme, host casing, trailing slash, removed params) so you can trust the canonical instead of guessing what the tool did.
Copy the canonical for a raw HTML `<head>`, a Next.js `metadata.alternates.canonical`, or a WordPress/PHP head. Not just the bare tag.
The href is properly attribute-escaped so query strings can't break the tag, and every URL is parsed locally: nothing you paste is uploaded or logged.
Point every variant of a page (www/non-www, http/https, tracked, trailing-slash) at one canonical so ranking signals consolidate instead of splitting across near-identical URLs.
A canonical built from the clean URL means a viral ?utm_source=twitter share or a ?gclid ad click never becomes the version Google stores and shows in results.
Self-referencing, absolute, single-canonical, matching host: the tool bakes in the rules that make Google respect your hint, so a subtle mistake doesn't get it silently ignored.
URLs are parsed and normalised entirely in your browser, so staging hosts, unpublished slugs and internal campaign links never touch a server.
From quick one-off fixes to daily workflows, see how people put this tool to use.
Generate one canonical for a page that's live at www and bare domain, with and without a trailing slash, and roll it out across all variants to merge their ranking signals.
Strip ?color=, ?sort= and pagination params to point faceted product-listing URLs at the clean category page, so thin filter combinations don't compete in search.
Copy the Next.js metadata or plain-`<head>` snippet and add a self-referencing canonical to every page in one place, instead of hand-writing link tags per route.
Turn a campaign URL full of utm_* and fbclid parameters into the clean canonical so the article ranks under one address no matter how it was shared.
Accepts URL, and produces HTML, Meta tags and HTTP header, all processed locally in your browser.
Generate perfect SEO meta tags, Open Graph and Twitter Card markup with a live Google snippet and social-card preview, copy the ready-to-paste <head> code, 100% in your browser.
Paste a page's HTML to audit its title, description, canonical, robots, Open Graph and Twitter Card tags: with a length score, missing/duplicate checks and a live search & social preview, 100% in your browser.
Percent-encode text and URLs instantly: pick component mode for query values or full-URL mode to preserve structure, with a per-line batch switch. 100% in your browser, nothing uploaded.
Format, validate and minify JSON in your browser with pinpoint error line + column, jump-to-error, key sorting and live editing: nothing is uploaded.
Write a click-worthy SEO meta description with a live character + pixel meter, a real Google snippet preview and ready-to-edit templates, copy the tag, 100% in your browser.
Type a page title and your brand and see a live Google title preview, desktop and mobile, with exact character and pixel limits and a truncation warning. 100% in your browser.
Hit a snag? Here are quick fixes for the issues people run into most.
Google treats rel=canonical as a hint, not a command. It's most often ignored when the canonical points to a page with different content, isn't reachable (returns a redirect or 404), conflicts with your sitemap or hreflang, or the page is also blocked in robots.txt. Make the canonical absolute, self-consistent and serving 200, and keep it in agreement with your other signals.
Always use an absolute URL with the scheme and host (https://example.com/page). Google technically resolves relative canonicals, but relative hrefs are a classic source of the tag resolving to the wrong address. This generator always outputs an absolute URL.
Only strip parameters that don't change the main content (tracking, sorting, session IDs). If ?id= or ?product= selects genuinely different content, keep it, canonicalizing distinct pages to one URL tells Google to drop the others from search.
If every duplicate 301-redirects to one URL, a canonical is largely redundant for those, but you should still add a self-referencing canonical on the destination page. Canonicals and redirects solve overlapping but not identical problems. The self-referencing tag protects against parameters and mirrors you didn't redirect.
Add a self-referencing canonical to every indexable page, it's the simplest defense against parameter and mirror duplicates you didn't anticipate.
Only one canonical per page: a second rel=canonical (or one in both the head and the HTTP header that disagree) makes Google ignore both.
Keep the canonical in agreement with your sitemap, internal links and hreflang: mixed signals are the top reason a canonical gets overridden.
For paginated series, self-canonicalize each page (page 2 → page 2), don't point them all at page 1. That hides the deeper pages from search.
Canonicalize to the https, non-tracked, lowercase-host version and use it consistently everywhere, including in your og:url.
Recent updates and improvements to the canonical url generator.
Initial release, rel=canonical tag generation with host/scheme/path normalisation, trailing-slash and fragment handling, tracking-parameter stripping, HTTP Link header and framework snippets.
Added a before/after normalisation diff, a removed-parameters list, and query-key sorting for deterministic canonicals.
Added copy/download shortcuts, curated examples (tracked link, www variant, faceted listing) and refined the self-referencing canonical guidance.
Every URL you paste is parsed and normalised locally in your browser with its native URL engine. Nothing is uploaded, stored or logged. Staging hosts, unpublished slugs and internal campaign links stay on your device, and closing the tab erases them completely.
Free, private and instant. Canonical URL Generator runs right in your browser.