Canonical Tag Generator

Generate canonical and hreflang link tags, with the common mistakes that cause pages to be dropped from the index flagged.

2Alternates
yesCanonical looks valid

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Canonical Tag Generator does

Use this canonical tag generator to generate canonical and hreflang link tags, with the common mistakes that cause pages to be dropped from the index flagged. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for consolidating duplicate URLs created by filters or tracking parameters. We run a second free tools site as well — FreeToolStation.org.

How to use it

  1. Enter the preferred, absolute URL for this page.
  2. Add language alternates if you publish the page in more than one language.
  3. Review any warnings shown above the output.
  4. Place the tags in the head of every version of the page.

How it works

A canonical tag tells search engines which URL is authoritative when the same content is reachable at several addresses. That happens more often than people expect: with and without a trailing slash, with and without www, with tracking parameters attached, with sort or filter parameters, and on both http and https.

The canonical must be absolute, must point at a page that returns 200, and must not point at a page that itself canonicalises elsewhere. A canonical chain is resolved unreliably, and a canonical pointing at a 404 or a redirect is a common cause of pages quietly disappearing from the index.

Hreflang must be reciprocal. If page A declares page B as its French alternate, page B must declare page A as its English alternate, and both must include a self-referencing tag. One-directional hreflang is ignored entirely, which is the single most common implementation error.

When to use it

  • Consolidating duplicate URLs created by filters or tracking parameters.
  • Setting up hreflang for a multilingual site.
  • Fixing a page that is not being indexed because of a bad canonical.

Common mistakes to avoid

  • Pointing every page's canonical at the homepage, which deindexes the entire site.
  • Including tracking parameters in the canonical URL.
  • Implementing hreflang in one direction only, which makes it ineffective.

Frequently asked questions

Can a page be its own canonical?

Yes, and it should be. A self-referencing canonical on every page is best practice — it removes ambiguity when the page is reached with parameters appended.

Why is hreflang not working?

Almost always because it is not reciprocal. Every page in the group must list every other page, including itself. Missing return tags cause the whole set to be ignored.

Does a canonical guarantee the other URL is dropped?

No. It is a strong hint, not a directive. Search engines may choose a different canonical if other signals — internal links, sitemaps, redirects — disagree with it.

Related tools

See all seo tools →