Skip to content

SEO Tools

Canonical Tag Generator

Paste your preferred URL and get the exact <link rel="canonical"> tag to add to your page.

  • Free
  • No sign-up
  • Runs in your browser

Guide

What a canonical tag is and how search engines use it

A canonical tag is a single line of HTML placed in the head of a page: a link element with rel="canonical" and an href pointing at the URL you consider the main version of that content. It tells search engines which address to treat as the preferred one when several addresses show the same, or nearly the same, page.

It is a hint, not a command. Search engines usually follow it, but they can choose a different URL if other signals (internal links, redirects, sitemaps) point somewhere else. Its job is to consolidate duplicates so that ranking signals gather on one address instead of being split across variants.

When you need one

The same page can often be reached through several URLs: with and without a trailing slash, with tracking parameters appended, through a print view, or under both http and https. Sorting and filtering options on listing pages create even more variants. Without guidance, a crawler has to guess which one to show.

Canonical tags are also useful when you syndicate or republish an article, since the copy can point back to the original. Even a page with only one address commonly carries a self-referencing canonical, which protects it if someone links to it with extra parameters. If you are also building other head tags, the Meta Tag Generator covers titles and descriptions.

How to generate the tag with this tool

  1. Type or paste the preferred URL into the Canonical URL box. It starts with an example address filled in.
  2. The Tag box below updates immediately and shows the full line, wrapped around whatever you typed.
  3. Click Copy to put the tag on your clipboard. The icon briefly changes to a check mark.
  4. Paste the line inside the head element of the page, not the body.

Everything happens in your browser as you type. The tool does not visit the URL you enter or check that it exists.

Mistakes to avoid and what the tool does not check

The tool only trims spaces from the start and end of your input and places it inside the tag. It does not validate the address, add the https:// part for you, or escape unusual characters, so check the result by eye. Use a full absolute URL including the protocol, because relative paths are easy to misread.

Use one canonical tag per page, and make sure it points to a page that returns a normal response, not an error or a redirect. Do not point a page at an unrelated URL just to pass signals, since that is likely to be ignored. Each page needs its own tag with its own address, so generate one per page rather than reusing a single line across a site.

Frequently asked questions

Does the tool check whether my URL is live?

No. It builds the tag from the text you enter and never contacts the address. Make sure the URL is correct and reachable before publishing the tag.

Where does the tag go?

Inside the head element of the HTML page it describes. A canonical link placed in the body is not reliable, so put it with your other head tags.

Should every page have a canonical tag?

It is common practice to add a self-referencing canonical to each indexable page. That way variants of the address with extra parameters still point back to the clean version.

Is the URL I type sent anywhere?

No. The tag is assembled in your browser, and copying uses your clipboard only.