Skip to content
Rankora
Free · runs in your browser

Canonical Tag Generator

Paste a page URL: the tool cleans it (https, tracking parameters, fragment, index file, trailing slash) and outputs the canonical tag and the HTTP header.

Privacy and cost

This tool runs in your browser. What you type or paste is not sent to our servers and it costs nothing to use.

How it works

  1. Enter the page URL as it appears in the browser or in your logs.
  2. Choose the normalisation rules: https, www or not, trailing slash, removal of tracking parameters or of the whole query string.
  3. Copy the tag into the <head>, or the Link header (handy for PDFs), with Apache and Nginx snippets.

Example

"http://www.example.com/Shoes/index.html?utm_source=news&color=red#reviews" becomes "https://www.example.com/Shoes/?color=red": switched to https, fragment removed, utm_source dropped, index.html removed. The resulting tag is <link rel="canonical" href="https://www.example.com/Shoes/?color=red">.

What the result means

The canonical tag tells Google the preferred version of a page that exists under several URLs. It is a strong signal but not a directive: Google may pick another URL if your signals conflict (internal links, sitemap, redirects). Keep the same URL form everywhere.

Common problems this tool helps with

  • Pages reachable with and without tracking parameters (utm_*) competing for rankings.
  • A canonical on http while the site is on https, or containing a fragment.
  • A canonical that is relative or differs from one page template to another, inconsistent with the sitemap.
  • Non-HTML files (PDFs) that cannot carry a tag and need the Link header.

Frequently asked questions

Should a page canonicalise to itself?

It is common good practice: a self-canonical helps consolidate URL variants (parameters, case, slash) on the chosen version. It is not mandatory.

Should I remove every parameter?

Only those that do not change the content (tracking, session). A parameter that changes the page, such as a filter or pagination, may deserve its own canonical.

Canonical or 301 redirect?

A 301 also sends visitors to the right URL and suits an old URL that should no longer exist. A canonical suits URLs that must both stay reachable.