Canonical Tag Generator

Generate a <link rel="canonical"> tag from any URL — normalize tracking parameters, protocol, and "www." automatically. Runs entirely in your browser.

<link rel="canonical" href="https://example.com/blog/how-to-build-an-api" />

Normalized URL

https://example.com/blog/how-to-build-an-api

Frequently Asked Questions

What is a canonical tag?+

A canonical tag is an HTML element — <link rel="canonical" href="..." /> — placed in the <head> of a page that tells search engines which URL is the "master" version when multiple URLs show the same or very similar content. It consolidates ranking signals (like backlinks) onto the canonical URL and prevents duplicate-content issues.

When do I need a canonical tag?+

Common cases: the same product page reachable via multiple category paths, pages with tracking parameters (?utm_source=...), paginated content, printer-friendly versions, and HTTP vs. HTTPS or www vs. non-www variants. If a URL can be reached more than one way, a canonical tag tells search engines which version to index.

Should the canonical URL include query parameters?+

Usually no. Tracking parameters like utm_source, ref, and session IDs do not change the page content, so the canonical should point to the clean URL without them. Parameters that genuinely change content — like a product variant or a search filter that produces different results — may warrant their own canonical or self-referencing tag.

Does a canonical tag guarantee my preferred URL gets indexed?+

No — Google treats canonical tags as a strong hint, not a directive. It considers other signals too (redirects, internal links, sitemaps, the rel=canonical of other pages) and may choose a different URL if it judges that to be more appropriate. Still, setting accurate canonical tags is one of the most reliable ways to influence that decision.

How to use

  • Paste the URL of the page — the canonical tag updates instantly.
  • Toggle options to strip tracking parameters, force HTTPS, or remove a leading "www.".
  • Copy the <link rel="canonical"> tag and paste it into the page's <head>.