CanonicalTag.com logoCanonicalTag.comThe canonical tag & URL canonicalization
Free canonical tool

Canonical Tag Generator

Enter the URL you want treated as the preferred version, and get a clean, copy-ready canonical tag for your HTML head — plus the HTTP header form for PDFs and other non-HTML files.

This generator runs entirely in your browser. The URL you enter is never sent to our server, so nothing is saved.

How to use the canonical tag it generates

Copy the HTML version and paste it inside the <head> section of the page you want to consolidate. On a page that should stand on its own, the canonical URL is simply the page’s own address (a self-referencing canonical). On a duplicate or a variant — a tracking-parameter URL, a print version, a filtered listing — the canonical URL is the clean version you want indexed instead.

Use the HTTP header version when the content is not HTML and has no head to edit, such as a PDF. Your server sends it as a response header rather than a tag in the markup. Both forms carry exactly the same meaning to search engines.

Get it right

A canonical URL should be absolute (it includes the scheme and domain, not just a path), should use https:// where an HTTPS version exists, and should match the target page exactly — the same protocol, host, and trailing-slash style the page actually serves. Place only one canonical tag per page. For the full rules, see the rel=canonical syntax reference and canonical tag best practices. To confirm a live page, use the Canonical Tag Checker.

Privacy

This tool is entirely client-side. Everything happens in your browser using JavaScript, so the URLs you enter are never transmitted to or stored on our server.

Frequently asked questions

Is the canonical tag generator private?

Yes. It runs entirely in your browser, so the URL you enter is never sent to or stored on our server.

Where do I put the generated canonical tag?

Paste the HTML version inside the <head> of the page. Use the HTTP header version for PDFs and other non-HTML files.

Should the canonical URL be absolute?

Yes. Google recommends an absolute URL that includes the scheme and domain, not a relative path.

Does every page need its own canonical tag?

A self-referencing canonical on every indexable page is the recommended baseline, though it is not strictly required.