Skip to content

Canonical Tag Generator

Write the canonical link tag, and check it points somewhere sensible.

Pick one and use it everywhere. Mixing the two styles is how a site duplicates every page it has.

Parameters that genuinely change the content, such as pagination.

Canonical tag

Your generated code appears here.

Quick Tool Overview

The Canonical Tag Generator writes a rel=canonical link from any URL, stripping the tracking parameters and session IDs that create duplicates in the first place, and flags the shapes Google quietly ignores — relative URLs, http on an https site, and canonicals pointing at something that redirects. The HTTP header form is produced for PDFs and other files.

What it does
Generates a canonical link tag and checks the URL is a sensible target
You give it
The URL you want treated as the original
You get back
A cleaned canonical link tag, plus the HTTP header version
Best for
Duplicate pages, tracked URLs, syndicated content and printable versions
SEO Tools Free, unlimited use No sign-up Runs in your browser

About the Canonical Tag Generator

Paste the URL you want treated as the original and the tool writes the canonical link tag, cleaned of tracking parameters, session IDs and the trailing-slash inconsistencies that create duplicates in the first place. It also writes the HTTP header form for PDFs and other non-HTML files.

A canonical is a hint, not an instruction, and the way it fails is quiet. Google ignores a canonical that points at a page which redirects, at a page blocked in robots.txt, at a page that is noindexed, or at a page whose content is plainly different. It also ignores one that is relative when the site is reachable on several hostnames. This tool checks for each of those shapes in the URL you give it, so the tag you paste has a chance of being honoured rather than silently discarded.

Key features of the Canonical Tag Generator

Tracking parameters stripped

utm, fbclid, gclid, msclkid and session IDs are removed, since canonicalising to a tracked URL defeats the point.

Absolute URLs enforced

A relative canonical breaks the moment the site answers on more than one hostname, so it is made absolute.

Common failure checks

Mixed protocols, inconsistent trailing slashes and non-canonical hostnames are all flagged.

HTTP header output

A PDF has no head element, so the Link header form is generated for exactly that case.

Self-reference reminder

The panel prompts for the self-referencing canonical that most sites are missing entirely.

How to use the Canonical Tag Generator

  1. 1

    Paste the preferred URL

    The version you want indexed — the one visitors should land on and links should point at.

  2. 2

    Clean it up

    Tracking parameters, session IDs and fragments are stripped, and the protocol and slash style are made consistent.

  3. 3

    Read the warnings

    Relative URLs, http on an https site and parameter leftovers are all flagged before you copy.

  4. 4

    Copy the tag

    Paste the link element into the head, or take the HTTP header form for a PDF or an image.

Frequently asked questions

A self-referencing canonical on every page is a safe default. It settles which URL is the real one when the same content is reachable through tracking parameters, both http and https, or with and without a trailing slash — all of which happen without anyone intending them.

Reviews of the Canonical Tag Generator

What people who use the Canonical Tag Generator think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Canonical Tag Generator. It takes half a minute and no account.

Write the first review

More SEO tools