Home › Developer Tools › Canonical Tag Generator

Canonical Tag Generator

Turn any page URL into a clean canonical URL, see exactly what changed, and copy the rel="canonical" link tag or HTTP header. Paste a whole list for bulk mode. Runs entirely in your browser.

Last updated:

Normalization rules

Host names are always lowercased and default ports (:80 for http, :443 for https) removed, because browsers treat them as identical. Tracking parameters removed: utm_*, gclid, gbraid, wbraid, dclid, fbclid, msclkid, yclid, ttclid, twclid, igshid, mc_cid, mc_eid, _ga, _gl, _hsenc, _hsmi, mkt_tok, srsltid and similar.

Advertisement

How to use the Canonical Tag Generator

  1. Paste the page URL, for example one copied from your browser with tracking parameters.
  2. Set the rules to match your site: https, www or not, trailing slash, which parameters to strip.
  3. Press Generate canonical tag and check the before / after comparison and the list of changes.
  4. Copy the tag into the page's <head>, or the HTTP header for PDFs and other files.
  5. Switch to Bulk URLs to clean a list of URLs at once, then copy the tags or download a CSV.

What each normalization rule does

RuleBeforeAfter
Force httpshttp://example.com/ahttps://example.com/a
Remove wwwhttps://www.example.com/https://example.com/
Lowercase host, default porthttps://Example.COM:443/https://example.com/
Remove index file/blog/index.html/blog/
Collapse double slashes/shop//shoes//shop/shoes/
Trailing slash: add/about/about/ (files like /a.pdf are left alone)
Remove tracking parameters?utm_source=x&id=7&gclid=abc?id=7
Sort parameters?size=42&color=red?color=red&size=42
Drop fragment/faq#shipping/faq

Path case is left alone by default because most web servers treat /Page and /page as different URLs. Only turn on Lowercase path if your server really serves the same content for both.

Canonical tag checklist

  • Absolute URL: always include https:// and the host. Relative canonicals work in theory but are easy to break.
  • One canonical per page, placed in the <head>. Multiple or conflicting canonicals are ignored.
  • Point to a 200 page: not to a redirect, a 404, a noindex page or a URL blocked by robots.txt.
  • Be consistent: internal links, the XML sitemap, hreflang tags and redirects should all use the same canonical form.
  • Do not canonicalize paginated pages to page 1; each page of a series has different content and should be self-canonical.
  • Use redirects for real moves. A canonical keeps both URLs accessible; a 301 redirect, which you can build with the htaccess redirect generator, retires the old one.

Canonical vs redirect vs noindex

Use a 301 redirect when an old URL should no longer be visited at all, for example after switching from http to https or from www to non-www. Use a canonical tag when duplicate URLs must keep working for visitors, such as tracking links from campaigns built with the UTM builder, filtered category pages or printer-friendly versions. Use noindex for pages that should not appear in search at all. Do not combine noindex with a canonical that points to another page, because the signals contradict each other.

Frequently asked questions

What is a canonical tag?

A canonical tag is <link rel="canonical" href="…"> in a page's head. It tells search engines which URL is the main version when the same content is reachable at several addresses, for example with and without www, with tracking parameters, or with sorting options. Search engines then consolidate ranking signals on that URL.

Should every page have a self-referencing canonical?

Yes, it is a widely recommended practice. A page whose canonical points to its own clean URL protects it from duplicates created by tracking parameters, session IDs or scrapers. Pages that are duplicates of another page should point to that other page instead.

Should the canonical URL have a trailing slash?

Either is fine, but be consistent and match what your server actually serves without a redirect. If /page/ and /page both work, pick one, redirect the other with a 301, and use the chosen form in canonical tags, internal links and the sitemap.

Which URL parameters should be removed?

Remove parameters that do not change the content: campaign tags (utm_source, utm_medium and so on), ad click IDs (gclid, fbclid, msclkid), session IDs and sort orders. Keep parameters that select different content, such as ?page=2 for paginated lists or ?id=42 when the ID selects the product.

Is a canonical tag a directive?

No, it is a strong hint. Google may choose a different canonical if signals conflict, for example if the canonical URL redirects, is blocked by robots.txt, is noindexed, or if internal links and the sitemap point elsewhere. Make all of these consistent.

When do I use the HTTP header instead?

Use the HTTP Link header for files that have no HTML head, such as PDFs: Link: <https://example.com/guide.pdf>; rel="canonical". Configure it in your web server or CDN for that file.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Meta Tag GeneratorCreate SEO, Open Graph and X meta tags with live previews.URL ParserBreak a URL into its parts and edit query string parameters with a live rebuild.UTM Campaign URL BuilderAdd UTM tracking parameters to links and make a QR code.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.Robots.txt TesterTest whether a URL is allowed or blocked by robots.txt for Googlebot and other crawlers.Privacy Policy GeneratorCreate a privacy policy for your website or app with CCPA, CalOPPA, COPPA and AdSense sections.Robots.txt GeneratorBuild a robots.txt file with rules, sitemap lines and AI-bot blocking presets.Sitemap GeneratorTurn a list of URLs into a valid XML sitemap file.SERP Snippet PreviewPreview your title tag and meta description with pixel-accurate truncation on desktop and mobile.Hreflang Tag GeneratorCreate hreflang tags, sitemap entries and Link headers for every language and region, validated.Content Security Policy GeneratorBuild a CSP header or meta tag with nonces, hashes, presets and report-only mode.Meta Tag AnalyzerPaste page HTML to audit title, description, canonical, robots, Open Graph and hreflang tags.Sitemap URL ExtractorExtract every URL from a sitemap.xml or sitemap index, validate it and export to CSV or TXT.Cookie Consent Banner GeneratorDesign a cookie banner with accept, reject and settings buttons and copy the HTML/CSS/JS.FAQ Schema GeneratorTurn questions and answers into FAQPage JSON-LD markup with validation and a preview.Google Review Link GeneratorTurn a Google Place ID into a direct review link, QR code and printable review card.Keyword Suggestion ToolTurn one seed keyword into hundreds of Google and YouTube autocomplete keyword ideas.Local Business Schema GeneratorCreate LocalBusiness JSON-LD with address, geo, opening hours, holiday hours and sameAs links.Structured Data ValidatorCheck JSON-LD, microdata and RDFa against schema.org and Google rich result requirements.Terms and Conditions GeneratorCreate terms of service for a website, store, SaaS or app, with payments and governing law.Breadcrumb Schema GeneratorBuild BreadcrumbList JSON-LD plus the matching HTML breadcrumb from names and URLs.Cookie Policy GeneratorCreate a cookie policy with a ready cookie table for Google Analytics, AdSense, Meta Pixel and more.Disclaimer GeneratorWrite a website disclaimer for affiliate, health, finance or blog sites, with short post notices.Keyword CombinerCombine up to 4 keyword lists into every combination in broad, phrase and exact match.Long Tail Keyword GeneratorTurn a seed keyword into long-tail keywords with best, how to, near me, year and for X modifiers.On-Page SEO CheckerPaste page HTML and a keyword to audit title, meta, headings, alt text and keyword use.App Privacy Policy GeneratorCreate a privacy policy for your iOS or Android app from its SDKs, permissions and data.URL Tracking RemoverStrip utm, fbclid, gclid and other tracking parameters from one link or hundreds at once.YouTube Keyword ToolFind YouTube search suggestions for a video topic with A-Z expansion and copy them as tags.
See all 28 SEO & Marketing Tools →