consolelog.tools

Canonical URL Generator

Build the perfect canonical URL with a live normalization pipeline you can see step-by-step, a curated tracking-parameter stripper (utm_*, gclid, fbclid & 50+ more), an hreflang builder, and a bulk duplicate-URL grouper that clusters variants by the canonical they collapse to. Export HTML link tags or Next.js metadata.

About this ToolHow it works, benefits & use cases

Duplicate content — the same page reachable at multiple URLs because of trailing slashes, mixed case, default ports, or reordered query parameters — splits your ranking signals and confuses crawlers. This tool generates the rel="canonical" link tag that points search engines to your preferred URL, and it normalizes that URL as you type: it strips trailing slashes, removes default ports (:80, :443), and sorts query parameters alphabetically so equivalent URLs collapse to one canonical form. The output updates live, with no button to press. You can optionally attach alternate-language rel="alternate" hreflang tags by adding language/URL pairs. As you work, the tool runs a quick check for common canonical mistakes — protocol mismatches, domain mismatches, and an HTTPS page pointing to an HTTP canonical — and surfaces them in an issues panel, alongside a set of best practices. Everything happens in your browser, and the configuration is captured in a shareable URL.

How to Use

  1. 1Enter your page URL in the "Page URL" field — the canonical tag appears immediately in the output panel.
  2. 2Check the "Normalized" line under the input to see how the URL was cleaned (trailing slash, default port, sorted query params).
  3. 3To add language variants, tick "Include alternate language tags (hreflang)" and add language code / URL pairs with the "Add" button.
  4. 4Review the "Issues detected" panel if it appears — it flags protocol or domain mismatches and HTTPS-to-HTTP problems.
  5. 5Copy or download the generated tag (canonical.html), or share the setup via its URL.

Key Benefits

  • Live output — the canonical tag regenerates as you type, no submit step
  • Automatic URL normalization: strips trailing slashes, removes default ports, sorts query parameters
  • Optional rel="alternate" hreflang tags for multi-language pages, added inline
  • Built-in issue checks for protocol mismatch, domain mismatch, and HTTPS-to-HTTP canonicals
  • Shows the normalized URL alongside your input so you can see exactly what changed
  • Curated canonical best-practices list right on the page
  • Runs in the browser with a shareable URL capturing your input

Common Use Cases

  • Adding self-referencing canonicals to pages to consolidate ranking signals
  • Normalizing URLs that differ only by trailing slash, case, or query-param order
  • Pairing a canonical with hreflang alternates on internationalized pages
  • Catching an accidental HTTP canonical on an HTTPS page before it ships
  • Standardizing the canonical URL format across a site's templates

Canonical URL

https://www.example.com/Blog/My-Post?id=42

Normalization pipeline (3 changes)

https://www.Example.com/Blog/My-Post/?utm_source=newsletter&id=42&utm_campaign=spring#section
Remove trailing slash
https://www.example.com/Blog/My-Post?utm_source=newsletter&id=42&utm_campaign=spring#section
Strip tracking params & tidy query
https://www.example.com/Blog/My-Post?id=42#section
Strip #fragment
https://www.example.com/Blog/My-Post?id=42
https://www.example.com/Blog/My-Post?id=42

Drop into your <head> (or app/route metadata)

<link rel="canonical" href="https://www.example.com/Blog/My-Post?id=42" />
  • Fragment (#…) present — Google ignores fragments in canonicals; strip it.
  • Tracking params present (utm_source, utm_campaign) — strip them so variants don't compete.

Page URL

Paste any messy variant — we’ll normalize it to the canonical you should declare.

Normalization rules

Strip tracking parameters

63 known analytics/ad params across 6 networks.

View the parameter database
Google Analytics (UTM)
utm_sourceutm_mediumutm_campaignutm_termutm_contentutm_idutm_source_platformutm_creative_formatutm_marketing_tactic
Google Ads & GA
gclidgclsrcdclidgbraidwbraidgad_source_ga_glga_sourcega_mediumga_campaign
Meta / Facebook & Instagram
fbclidfb_action_idsfb_action_typesfb_sourcefb_refigshidigsh
Microsoft / Bing & LinkedIn
msclkidmc_cidmc_eidli_fat_idtwclidttclid
Email / CRM
mkt_tokhsa_acchsa_camhsa_grphsa_adhsa_srchsa_tgthsa_kwhsa_mthsa_nethsa_ver_hsenc_hsmivero_idvero_conv
Referral / misc
refreferrersourcecmpidcampaignidadgroupidyclidmkwidpcrids_kwcidck_subscriber_idoly_anon_idoly_enc_idspmscm

hreflang alternates (0)

No alternates. Add language/region versions of this page for international SEO.

See the canonical, don’t guess it

Canonical tags exist to collapse duplicate variants — www vs apex, trailing slashes, mixed case, and especially tracking params — onto one preferred URL. This tool shows the exact normalization pipeline firing rule-by-rule, strips 63+ known tracking params, and in bulk mode groups a list of messy URLs into the canonicals they collapse to, so you can spot duplicate clusters across a whole site. Export HTML <link> tags or a Next.js metadata.alternates block.

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools