Generate a canonical link tag for a page.
<link rel="canonical" href="https://example.com/page" />
Add this inside your page's <head> to tell search engines which URL is the canonical version.
It tells search engines which URL is the 'master' version of a page when the same or similar content is reachable at multiple URLs (with tracking parameters, trailing slashes, or http vs. https, for example) — consolidating ranking signals to one URL instead of splitting them.
Any time a page's content can be reached through more than one URL: paginated content, URL parameters like ?sort=, print versions, or the same product listed under several category paths.
It's common and safe practice — a self-referencing canonical tag reinforces which URL is authoritative even when there's no known duplicate yet.