About this tool
About Canonical Tag Generator
Generate an HTML canonical link tag from the preferred absolute URL for a page. Review the output and copy it into the document head or the matching SEO setting in your CMS. The generator formats a tag; it does not inspect your site or choose the canonical URL for you.
How to generate a canonical tag
- Enter the full preferred page URL, including https:// and its exact path.
- Generate the link tag.
- Check the hostname, path, trailing slash and query parameters.
- Add the tag inside the HTML head and inspect the rendered page after publishing.
Example canonical output
For a preferred URL of https://example.com/products/widget, the output is:
<link rel="canonical" href="https://example.com/products/widget">
Use a URL that represents the same or substantially equivalent content. A canonical tag is a signal for search engines, so the generated markup alone cannot guarantee which URL will be selected.
Self-referencing and duplicate URLs
A self-referencing canonical points to the page's own preferred URL. Equivalent parameter or duplicate pages may point to a clean version, but unrelated pages should not all point to the homepage. Check that the target can be indexed and that internal links and the sitemap use the intended URL.
Canonical and hreflang work together
A translated page generally needs its own localized canonical rather than the English page's canonical. Use the Hreflang Tag Generator for alternate language URLs and the Sitemap Generator to list preferred indexable URLs. The Meta Tag Generator handles other page metadata.
Local generation and verification
The supplied URL is formatted in the browser during the normal workflow. After publishing, check for duplicate canonical tags and confirm that JavaScript, templates or CMS plugins have not replaced the chosen URL.
