Free • Avoid duplicate content

Canonical URL Generator

Generate a canonical link tag to tell Google which version of a page is the preferred one to index and rank.

STEP 1

Enter the preferred URL

The version of this page you want Google to index.

STEP 2

Copy the tag

A single line of HTML.

STEP 3

Place it in <head>

Add it to the <head> of every duplicate or near-duplicate page.

Generate canonical tag

Use this when the same content exists at multiple URLs (with/without trailing slash, with tracking params, etc.).

When to use canonical tags

A canonical tag tells search engines "this page may exist at several URLs, but please treat this one as the original." Without it, Google may split your ranking signals across duplicates, hurting all of them.

Common scenarios where canonicals help

Good vs bad examples

✕ Bad

<link rel="canonical" href="page.html">

Relative URL. Always use absolute URL including https://.
✕ Bad

<link rel="canonical" href="https://example.com/page?utm=x">

Includes tracking params. Strip them in the canonical.
✓ Good

<link rel="canonical" href="https://example.com/page">

Clean, absolute, no parameters.
✓ Good

<link rel="canonical" href="https://example.com/blog/post-name">

Self-canonical: the page points to itself. Recommended for primary pages.

Frequently asked questions

Should every page have a canonical tag?

Yes. Even pages with no duplicates benefit from a self-referencing canonical tag (pointing to themselves). It removes ambiguity.

What is a self-referencing canonical?

A canonical tag where the URL matches the page it is on. Best practice for all primary content pages.

Will Google always honor my canonical?

Not always. Google treats canonical as a strong hint, not a directive. If two pages have conflicting signals, Google may pick the other URL.

Can a canonical point to a different domain?

Yes. Useful when you syndicate content. The republisher canonical-tags back to your original.

What if I forget to set a canonical?

Google will try to pick one itself, which is sometimes wrong. Better to set it explicitly.