Technical SEO
What is a canonical tag and how do I use it?
Short answer
A canonical tag is a link element in the page head that tells search engines which URL is the preferred version of a page when several addresses show the same content. Give every page a self-referencing canonical on its one real URL, and make sure the host, protocol and trailing slash match what you serve.
Syntax
<link rel="canonical" href="https://www.example.com/pricing" />
It goes in the <head>. For non-HTML files such as PDFs you can send it as an HTTP Link header instead.
Rules of thumb
- Self-reference. Each indexable page should name itself as canonical.
- Use one host and one protocol. Pick www or non-www and https, redirect the others, and use the same form in every canonical, link and sitemap entry.
- Use absolute URLs. Include the protocol and host.
- Match your redirects. A canonical should point at a page that returns 200, not at a redirect.
- Do not point different pages at one canonical unless they really are duplicates.
Common mistakes
- Canonical pointing at a staging or http address.
- A canonical on a page that is also marked noindex. The signals conflict.
- Parameters (
?utm_source=) creating duplicate URLs with no canonical. - A canonical that differs from the URL in your sitemap.
How SageRank helps
The page basics check in the free SageRank report tests whether your home page has a canonical link, along with title, description, Open Graph tags, sitemap and HTTPS. Run it with sagerank.io/yourdomain.