The generator requires an absolute URL
A relative value such as /page/ is rejected because a canonical target should be expressed as a complete URL.
Free browser tool
Generate a canonical link tag from an absolute canonical URL.
Turn an absolute page URL into a canonical link element, normalizing the URL and removing any fragment.
<link rel="canonical"> tag.https://example.com/page/#section becomes a canonical tag pointing to https://example.com/page/.Canonical is a consolidation hint, not a redirect. Internal links, redirects, sitemap URLs and duplicate-page behavior should point in the same direction when possible.
A relative value such as /page/ is rejected because a canonical target should be expressed as a complete URL.
Fragments identify a position within a resource rather than a separate canonical document, so the main generator clears the hash.
Minor presentation details such as hostname casing or percent-encoding can be standardized in the generated URL. A #fragment is removed intentionally.
Search engines can consider other signals. A canonical tag works best when redirects, internal links and sitemaps are also consistent.