Canonical Tag Generator — link rel=canonical Builder | LazyTools

Free SEO Tool · Canonical Tags · Duplicate Content · Bulk Mode

Canonical Tag Generator

Generate canonical link tags with auto URL cleanup. Strip UTM parameters, enforce HTTPS and trailing slash, bulk processing and URL validation checks.

🔗 Canonical Tag Generator
🎯 Canonical URL
Canonical URL (preferred version)
⚙️ Options
📦 Bulk mode (one URL per line)
📋 Canonical tag
📦 Bulk output
🔗 Canonical tag builder🧹 Auto URL cleanup📦 Bulk mode✅ URL validation

How to Use the Canonical Tag Generator

Enter the preferred (canonical) URL of your page to generate the correct link rel="canonical" HTML tag. Furthermore, the four cleanup options automatically strip UTM parameters, force trailing slashes, lowercase the URL and remove URL hash fragments. Additionally, bulk mode processes dozens of URLs simultaneously and exports them as a text file.

  1. Enter the canonical URLThe canonical URL is the preferred version of the page — the URL Google should index and consolidate PageRank to. Furthermore, always use the HTTPS version. Additionally, decide on trailing slash vs no trailing slash and apply it consistently across the entire site.
  2. Select URL cleanup optionsStrip UTM parameters removes tracking tags from the canonical URL — UTM params should never appear in canonical tags. Furthermore, force trailing slash and lowercase ensure URL consistency. Additionally, stripping hash fragments removes anchor links that do not change page content.
  3. Read the URL validation checksThe tool checks for HTTPS, UTM parameters, mixed case and trailing slash consistency. Furthermore, each check shows a clear pass or fail with an explanation. Additionally, all checks must pass before the canonical tag is ready to deploy.
  4. Copy the canonical tagCopy the generated link tag and paste it inside the HTML head section of the page. Furthermore, ensure it appears on every version of the URL — including the UTM-tagged and trailing-slash variants. Additionally, use Yoast SEO or RankMath to manage canonical tags in WordPress.
  5. Use bulk mode for multiple pagesPaste multiple URLs (one per line) in the bulk input. Furthermore, all cleanup options apply to each URL automatically. Additionally, download the output as a text file to share with your developer or CMS team.

What Is a Canonical Tag?

A canonical tag (link rel="canonical") tells search engines which version of a URL is the preferred, authoritative one. Furthermore, it consolidates ranking signals from duplicate or near-duplicate URLs to a single preferred URL. Additionally, without canonical tags, Google may treat every URL variant as a separate page — diluting PageRank and creating duplicate content issues.

<link rel="canonical" href="https://example.com/preferred-page/"> Place inside <head> of every page version: https://example.com/page → same canonical https://example.com/page/ → same canonical https://example.com/page?utm_source=google → same canonical https://www.example.com/page → same canonical
A canonical tag should appear on the canonical page itself (self-referencing) and on every variant. Furthermore, self-referencing canonicals on the preferred URL signal to Google that no other URL should outrank it. Additionally, Google's John Mueller has confirmed that self-referencing canonicals are a best practice.

When to Use Canonical Tags

SituationCanonical points toWhy
UTM-tagged URLsClean URL without UTM paramsUTM variants must not dilute SEO
HTTP vs HTTPSHTTPS versionHTTPS is the preferred protocol
Trailing slash vs noneConsistent preferred versionPrevents duplicate indexing
www vs non-wwwPreferred domain variantConsolidates PageRank
Faceted navigation URLsCategory pageFilters create thousands of URL variants
Paginated pagesFirst page of the seriesPrevents page 2+ from competing with page 1
Syndicated contentOriginal source pageAttribution back to original publisher
Reference: Google Search Central — canonical URL guidance | Bing Webmaster — canonical handling.

Canonical Tag vs 301 Redirect

Both canonical tags and 301 redirects consolidate duplicate URL signals to one preferred URL. Furthermore, a 301 redirect changes the URL in the browser — the user lands on the preferred URL. Additionally, a canonical tag allows the variant URL to remain accessible while telling search engines which version to prefer.

Use a 301 redirect when the old URL should never be accessible. Furthermore, use a canonical tag when the variant URL must remain live — for example, UTM-tagged URLs that analytics platforms need to track. Additionally, canonical tags are a softer signal than 301 redirects — Google may override them if it disagrees with the canonical choice.

Common Canonical Tag Mistakes

Pointing a canonical tag to a page that returns a 404 error prevents Google from consolidating signals. Furthermore, setting different canonical URLs on the same page across different server renders (desktop vs mobile) confuses crawlers. Additionally, having multiple canonical tags on the same page — a common plugin conflict in WordPress — renders them both invalid.

Canonical tags in the page body (not the head section) are also ignored by Google. Furthermore, always place canonical tags inside the HTML head element. Additionally, use Google Search Console's URL Inspection tool to verify which canonical URL Google has selected for any given page.

International Sites — Canonical and Hreflang Together

For international sites with content in multiple languages, canonical tags and hreflang tags work together. Furthermore, the canonical tag points to the preferred URL for that specific language/region version. Additionally, hreflang tags tell Google about the relationship between different language versions — they do not replace canonical tags.

Verifying Your Canonical Tags

Google Search Console's URL Inspection tool shows which canonical URL Google has selected — the "Google-selected canonical" may differ from your declared canonical if Google disagrees. Furthermore, view-source in a browser confirms whether the canonical tag appears in the HTML head. Additionally, Screaming Frog SEO Spider can crawl an entire site and export canonical tag data in bulk.

Frequently Asked Questions

An HTML link tag that tells search engines which URL version is the preferred, authoritative one. Furthermore, it consolidates PageRank from duplicate URLs. Additionally, Google may override it if it disagrees with the canonical choice.
Yes — including self-referencing canonicals on the preferred URL. Furthermore, they prevent duplicate content issues from URL variants. Additionally, Google's John Mueller recommends self-referencing canonicals as best practice.
301 redirect: browser redirects to the preferred URL. Canonical: variant URL stays live but signals the preferred URL to search engines. Furthermore, use 301 for permanently retired URLs. Additionally, use canonical for UTM-tagged URLs that analytics needs to track.
Yes — always point canonical to the clean URL without UTM parameters. Furthermore, UTM-tagged URLs can inflate indexed page count. Additionally, use the Strip UTM option in this tool to auto-clean the canonical URL.
Either is fine — choose one and apply it consistently across the entire site. Furthermore, mixing trailing and non-trailing slash versions creates duplicate content. Additionally, canonical tags resolve the conflict when consistency is incomplete.
All canonical tags become invalid if more than one appears in the head. Furthermore, WordPress plugin conflicts often cause this. Additionally, use view-source to check for duplicate canonical tags.
Yes — Google treats canonical as a hint, not a directive. Furthermore, if Google finds the canonical points to a poor-quality or thin page, it may ignore it. Additionally, use consistent internal linking to the canonical URL to reinforce the signal.
WordPress: Yoast SEO or RankMath manage canonical tags per page. Shopify: Liquid canonical tag is set automatically. Furthermore, avoid adding canonical tags manually if a plugin is handling them. Additionally, check for conflicts using Google Search Console URL Inspection.

Related SEO Tools

Hreflang Tag Generator

International SEO language tags. Furthermore, canonical and hreflang tags work together on multilingual sites.

UTM Builder

Build UTM-tagged URLs. Additionally, always strip UTM parameters in the canonical tag — use this tool to generate the clean canonical URL.

Open Graph Preview

og:url should always match the canonical URL. Furthermore, consistent og:url and canonical prevents social/SEO conflicts.

Robots.txt Generator

Control which URLs search engines crawl. Additionally, canonical tags and robots.txt work together to manage URL indexing.

WHOIS Domain Lookup

Verify domain configuration before deploying canonical tags. Furthermore, www vs non-www canonical choice depends on DNS setup.

Bounce Rate Calculator

Measure SEO traffic quality after canonical consolidation. Additionally, improved canonical structure reduces duplicate-content traffic dilution.

Rate this tool

4.6
out of 5
158 ratings
5 ★
73%
4 ★
16%
3 ★
7%
2 ★
3%
1 ★
1%
How useful was this tool?