Skip to content

Free Canonical Tag Generator

Paste a URL, tidy it up with a few options and copy a correct canonical link tag for your page.

  • 100% free
  • Runs in your browser
  • Instant results
Only tick this if your site really serves lowercase URLs.
Quick answer

This canonical tag generator turns a URL into a correct rel=canonical link element. It makes the URL absolute, can switch it to HTTPS, add or remove www, strip tracking parameters, fix the trailing slash and remove the #fragment, then gives you the HTML tag and the matching HTTP header.

How to use the Canonical Tag Generator

  1. Paste the preferred URLEnter the address you want search engines to treat as the main version of the page.
  2. Choose clean-up optionsDecide what happens to query parameters, the trailing slash, www and the protocol.
  3. Copy the tagPress Copy and paste the link tag inside the <head> of the page and of its duplicates.

How the canonical tag generator works

A canonical tag is a <link rel="canonical" href="…"> element in the head of a page. It tells search engines which URL is the main version when the same or very similar content can be reached at several addresses. The canonical tag generator cleans the URL you paste and writes the tag:

  • The host name is lower-cased and the URL is made absolute, which is what search engines recommend.
  • The #fragment is always removed, because fragments are not part of the page address for search engines.
  • Tracking parameters such as utm_source, gclid and fbclid can be removed while real parameters such as ?color=blue stay.
  • The & between remaining parameters is escaped as &amp; in the HTML, as valid markup requires.

You also get the same canonical as an HTTP Link header. That form is used for PDFs and other files that have no HTML head.

The tool cannot know how your server answers, so choose options that match reality. If your pages load at /page/ with a slash, the canonical should have the slash too.

When and how to use canonical tags

Duplicate URLs appear more easily than people expect: http and https, www and non-www, tracking links, sort and filter parameters, print versions and the same product in two categories. Without guidance, search engines choose a version themselves and links may be split between copies.

  • Put a self-referencing canonical on every indexable page. It protects against parameter and tracking duplicates.
  • Point duplicates to the main page. The canonical on a filtered or tracked URL should name the clean URL.
  • Use one canonical per page, in the head, with an absolute URL.
  • Canonical target must work. It should return a 200 status, be indexable and not redirect.
  • Do not canonicalise different content. Page 2 of a list or a translated page is not a duplicate of page 1.

A canonical tag is a strong hint, not a command. Google can choose a different URL if other signals, such as internal links, redirects or the sitemap, disagree. When an old URL should never be visited again, a 301 redirect is the stronger tool. You can create one with the .htaccess redirect generator. For multilingual pages, combine self-referencing canonicals with the hreflang tag generator.

Frequently asked questions

What is a canonical tag?

A canonical tag is an HTML link element with rel="canonical" that names the preferred URL of a page. It helps search engines pick one version when the same content is available at several URLs.

Where does the canonical tag go?

Inside the head section of the HTML. A canonical tag placed in the body is ignored. Most CMS platforms and SEO plugins add it automatically and let you override the URL.

Should a page have a canonical tag pointing to itself?

Yes, that is good practice. A self-referencing canonical tells search engines that this clean URL is the main one, even when people link to it with tracking parameters.

Should the canonical URL be absolute or relative?

Use an absolute URL including https:// and the host. Relative canonicals are allowed but cause errors more easily. The canonical tag generator always outputs an absolute URL.

Is a canonical tag the same as a 301 redirect?

No. A redirect sends visitors and crawlers to another URL. A canonical leaves the page reachable and only suggests which URL to index. Use a redirect when the old URL should no longer be used at all.

Last updated 24 November 2026 by the TheTechFolk team.