Canonical Tag Generator

Paste any URL and get the correct <link rel="canonical"> tag ready to paste into your HTML. Normalize HTTPS, www, trailing slashes, and query strings in one click.

Instant Generation
Paste your URL and get the complete canonical link tag in one click, ready to add to your <head>
🛠
URL Normalization
Force HTTPS, remove www, strip trailing slashes, and drop query strings to create consistent canonical URLs
📈
URL Inspector
Shows a breakdown of the parsed URL so you can verify each component of the resulting canonical
📋
One-Click Copy
Copy the full <link> tag or just the canonical URL — whichever you need for your workflow

Canonical Tag Examples

Self-referencing canonical (most common use):
<link rel="canonical" href="https://www.example.com/blog/my-article/">
Normalizing duplicate URLs to one canonical:
<!-- All of these pages point to the same canonical --> <!-- https://example.com/page/?ref=social --> <!-- http://www.example.com/page/ --> <!-- https://example.com/page --> <!-- They all include: --> <link rel="canonical" href="https://www.example.com/page/">
Cross-domain canonical (syndicated content):
<!-- On the republishing site (e.g. Medium): --> <link rel="canonical" href="https://www.yoursite.com/original-article/">

What Is a Canonical Tag and When Do You Need One?

A canonical tag is an HTML element that tells search engines which version of a page is the definitive one. It goes inside the <head> section as <link rel="canonical" href="...">. Search engines like Google use it to consolidate ranking signals when the same — or very similar — content appears at multiple URLs. Without a canonical tag, search engines have to guess which URL to index, which can split your link equity across duplicates and reduce rankings for all of them.

The most common situation requiring a canonical tag is a page accessible at multiple URLs: http:// and https:// versions, with and without www, with and without a trailing slash, or with UTM and session query parameters appended. Even when only one version is intended to be crawled, search engines may still discover and index multiple variants. A self-referencing canonical tag — where the canonical URL matches the page's own URL — signals your preferred version clearly and is recommended by Google for every page on your site.

Canonical tags also apply across domains. If you republish content from your own site on a third-party platform, you can add a canonical tag on the republished version pointing back to your original URL. This prevents the syndicated version from outranking the original and tells Google where the content first appeared. The canonical tag is advisory, not a directive — Google may choose to ignore it if it believes a different URL better represents the content — but correctly implemented canonicals are respected in the vast majority of cases.

How to Add a Canonical Tag

  1. Paste the page URL: Enter the full URL of the page you want to canonicalize — including protocol and path. The tool accepts any valid URL format.
  2. Choose normalization options: Force HTTPS to ensure the canonical always uses a secure URL. Remove www if your site's primary domain is the bare domain. Strip trailing slash if your server treats slashes as optional. Remove query strings to exclude UTM parameters and session IDs from the canonical.
  3. Generate the tag: Click the button to see the normalized canonical URL and the complete HTML link tag. The URL breakdown shows each parsed component so you can verify the output.
  4. Copy and paste: Copy the full tag and paste it inside the <head> section of your page, before the closing </head> tag. In WordPress, this is typically handled via a plugin like Yoast SEO or Rank Math — use the canonical URL field there instead.
  5. Verify with Search Console: After deploying, use Google Search Console's URL Inspection tool to confirm Google is recognizing your canonical correctly. The tool shows both the user-declared and Google-selected canonical for any URL.