Generate canonical link tags for your web pages. Specify the preferred URL version to avoid duplicate content issues and consolidate link equity for better SEO.
A canonical tag (rel="canonical") tells search engines which version of a URL is the preferred or "canonical" version. This is essential for preventing duplicate content issues when the same or similar content is accessible through multiple URLs, such as with HTTP/HTTPS, www/non-www, or URL parameters.
<link rel="canonical" href="[preferred-url]" />The canonical tag is placed in the <head> section of your HTML. It contains a single href attribute pointing to the preferred URL. Search engines will treat all similar pages as referring to the canonical URL, consolidating link signals to the preferred version.
| Input | Output |
|---|---|
| https://example.com/product | <link rel="canonical" href="https://example.com/product" /> |
| https://www.example.com/blog/post | <link rel="canonical" href="https://www.example.com/blog/post" /> |
| https://example.com/page?param=value | <link rel="canonical" href="https://example.com/page" /> |