Canonical Tag Generator

Generate a canonical link tag from any preferred URL — paste the tag into your page head to tell search engines which version of a page is the authoritative one. Updates live as you type.


Use the absolute URL of the page you want search engines to index. Include https:// and no trailing slash unless that is your standard.

Enter a URL above to generate the canonical tag.

Frequently Asked Questions

What is a canonical tag?

A canonical tag (rel=”canonical”) tells search engines which URL is the preferred version of a page when duplicate or similar content exists across multiple URLs.

When should I use a canonical tag?

Use it when the same content is accessible via multiple URLs — such as with tracking parameters, www vs non-www, HTTP vs HTTPS, or paginated versions pointing to a main page.

Should the canonical URL be absolute?

Yes. Google recommends absolute URLs including the protocol (https://). Relative canonicals can cause confusion and are best avoided.

How does this relate to hreflang?

Canonical tags define the preferred URL within one language version. Use the Hreflang Tag Generator for cross-language alternates.

Is this tool free and does it work on mobile?

Yes on both counts. The Canonical Tag Generator on draft21 is completely free with no sign-up required and works on all devices.