Skip to content
HomeTechnical SEOCanonical Tag Generator

Canonical Tag Generator

Type in the URL you want treated as authoritative, and get back a correctly formatted canonical tag — no missing quote marks, no wrong attribute order, ready to paste into your page's head.

Use the exact URL you want search engines to treat as authoritative — including the correct protocol (https), the correct www / non-www form, and no unnecessary tracking parameters.

HTML tag

<link rel="canonical" href="https://example.com/products/blue-widget" />

Place this inside your page's <head> — a canonical tag outside <head> is commonly ignored.

What Is Canonical Generator?

A canonical tag is a single line of HTML, placed in a page's <head>, that tells search engines which URL should be treated as the authoritative version when several URLs could serve the same or near-identical content. It's written as a self-closing link element with rel="canonical" and an href pointing to the preferred URL.

This generator exists because the tag itself is simple, but small mistakes — a missing protocol, a stray trailing slash inconsistency, an unescaped character — are easy to introduce when typing it by hand repeatedly across many pages or templates.

How to Use This Tool

  1. 1Enter the full URL, including https://, that you want this page to canonicalize to.
  2. 2For most pages, that's simply the page's own URL — a self-referencing canonical.
  3. 3Copy the generated tag and paste it inside the page's <head> section.
  4. 4Repeat for each page, or wire the URL into your CMS template so it generates automatically per page.

Understanding Your Results

Why the URL needs the full protocol

A canonical href should be an absolute URL (starting with https:// or http://), not a relative path. A relative canonical can be resolved inconsistently across different crawlers and tools, which defeats the purpose of giving an unambiguous signal.

Where the tag needs to live

The canonical tag must be inside the <head> element to be recognized. A canonical tag placed in the <body> is commonly ignored by search engines, even though it's technically valid HTML in some contexts.

Common Problems & How to Fix Them

Generating the tag with the wrong protocol or www form

If your site has both http and https, or both www and non-www, versions technically reachable, make sure the canonical URL always uses your actual preferred form consistently across every page — mixing forms across different pages' canonicals recreates the exact ambiguity canonical tags are meant to resolve.

Copying the tag but forgetting to update it per page

A canonical tag copy-pasted from one page to every other page (rather than updated per page) will incorrectly tell search engines every page is a duplicate of that first one. If you're templating this across many pages, wire the URL to be dynamic per page rather than hardcoding a single value.

SEO Best Practices

Default to a self-referencing canonical on every indexable page, and only point elsewhere for a specific, deliberate reason (a tracked or parameterized duplicate, for instance).

Keep the canonical consistent with your XML sitemap — a page listed in your sitemap with a different canonical than the sitemap URL sends a mixed signal.

After deploying canonical tags at scale, spot-check a sample of pages with a canonical checker to confirm the values are what you expect, especially right after a template change.

Frequently Asked Questions

Can I use this for a canonical that points to a different page?

Yes — just enter the URL of the page you want treated as authoritative, whether that's the current page itself or a different one entirely, such as a primary version of a duplicated or parameterized page.

Does the canonical tag need to be the very first thing in <head>?

No strict position is required, but placing it early in the <head> is common practice and reduces the risk of a templating issue accidentally dropping it further down the page.

Will this tag alone fix duplicate content issues?

It's the main tool for the job, but not the only one — pairing consistent canonicals with a clean internal linking structure and, where appropriate, redirects for truly redundant URLs gives the strongest signal.

Related SEO Tools