This article covers one of the key topics in search engine optimisation (SEO): canonical URLs. Find out what a canonical URL is, why it matters and how to use canonicals in your SEO strategy.
What is a canonical URL?
A canonical URL is the web address of the main version of a page when a website contains duplicate pages. Search engines such as Google pick a canonical URL for each set of duplicates so that repeated pages do not all show up in search results.
What is a canonical tag?
A canonical tag is a snippet of HTML that tells search engines which page is the "main" one within a set of duplicate content. It tells Google which version of the page to index, so that the page keeps all the link equity. In the code it looks like this:
<link rel="canonical" href="https://www.example.com/" />
Why should I use canonical tags?
Expert insight from Google
"There are a number of reasons why you would want to explicitly tell Google about a canonical page in a set of duplicate or similar pages:
- To specify which URL that you want people to see in search results.
- To consolidate signals for similar or duplicate pages.
- To simplify tracking metrics for a piece of content.
- To avoid spending crawling time on duplicate pages."
The big question about canonical URLs is: "Why should I use them?". The answer: duplicate content.
Duplicate content means two or more pages that contain similar or identical information. The problem is not limited to your own website: someone could take content from your site and publish it on theirs, which also creates duplicate content.
So what is the problem?
Duplicate content hurts rankings. Instead of concentrating all the value and link equity on one page, it is spread across several pages and diluted. Those pages then compete for the same keywords, which leads to keyword cannibalisation.
Keyword cannibalisation happens when several pages target the same keywords and end up competing with each other.
If you were trying to outrank a competitor, no single page would have enough link equity to do it, because the equity is split across several pages fighting for the same position.
You may also not want to remove the duplicate page altogether, because it may have some value. Rather than losing that value, you can pass it on to the main page.
Without canonical URLs, you also risk:
- Less organic traffic reaching your website
- Fewer pages being indexed (which means people will not see them in search results)
- Penalties (very rare, usually only for websites that deliberately copy content from another site).
That is why canonical URLs matter in SEO. A canonical link to a page attributes all the value to that page, so it has a better chance of ranking in search results.
4 best practices for using canonical URLs
Ready to add canonical tags to your website? Here are four best practices for setting up canonical links on your site:
1. Use Google Search Console to find duplicate content
Before you can add a canonical tag, you need to find where duplicate content exists. The simplest way is to use Google Search Console.
The Page indexing report in Google Search Console lists the URLs Google has treated as duplicates, with statuses such as "Duplicate without user-selected canonical" and "Duplicate, Google chose different canonical than user". This gives you a starting point for deciding where a canonical tag is needed.
2. Use only one canonical URL per page
Once you have identified the pages that need a canonical tag, make sure you use only one canonical URL per page. If a page carries several canonical tags, Google will not know which one to follow.
3. Use your website's full URL in the canonical tag
To get canonicalisation right, use the website's full URL in the canonical tag, in other words the absolute URL.
An absolute URL looks like this:
https://www.visilay.com/services/seo/
Inside the canonical tag, it looks like this:
<link rel="canonical" href="https://www.visilay.com/services/seo/" />
Use the full, absolute URL rather than a relative one. A relative URL is just the path after the domain: in this example, "/services/seo/". Google's documentation recommends absolute paths over relative ones in rel="canonical", because relative paths can cause problems later (for example if a test site gets crawled by mistake), so put the full address in the canonical tag.
4. Pay attention to the small details of your canonical URL
Canonicalisation in SEO comes down to small details. Your URL has several elements you need to check carefully so that the right page gets indexed.
Here are a few to look at:
Protocol
When you create your canonical tag, make sure the URL uses the correct protocol.
One of the duplicate content issues Google Search Console can surface is the same page available under two protocols: HTTP and HTTPS. So when you write the URL, use the correct protocol to get the right page indexed.
As a rule, if your site supports it, use HTTPS in the canonical URL.
Trailing slash
When you put the URL in the canonical tag, check whether it has a trailing slash. Here is the difference:
- No trailing slash: your URL looks like "www.visilay.com/company"
- Trailing slash: your URL looks like "www.visilay.com/company/"
Check whether the main page uses a trailing slash, so you can point Google to the right page.
Web address
When you check your canonical URL, make sure you use the correct version of your web address. Some websites use "www.", others leave it out altogether. Here is how the two look:
- With www: https://www.visilay.com/company/
- Without www: https://visilay.com/company/
To keep your site consistent, pick one format and use it in every canonical URL.
Learn more about optimising your website for search engines
Want to know more about topics such as canonicalisation in SEO? Read our SEO guide and the rest of our blog for best practices, tips and more.
Take the next step with your SEO strategy. The Visilay team can help you set up canonicalisation properly and improve your search performance. Get in touch today to find out how we can support your SEO work.