If you’re reading this then you are probably wondering what exactly canonical URLs are and why they are important for SEO. It’s quite simple really, if you have 2 pages with the same or very similar content the canonical URL is the one that you want the search engines to show users and the rel=“canonical” code is just a means of telling the search engines that.
For example, we often see that there are several versions of a website’s homepage i.e.
www.thisisanexample.com thisisanexample.com www.thisisanexample.com/index.html
A canonical URL is the one that you tell Google (and the other, let’s face it, less important search engines) is the correct, standard, single, original, established and or the most relevant URL.
Here is an example of rel =”canonical” in action:
<link rel="canonical" href="http://www.thisisanexample.com>
You should add this piece of code to the head section of each of the non-canonical versions of the URL (the pages that you don’t want users being brought to).
Canoncial URLs are particularly useful if you have an ecommerce website with lots of products. The product pages may have different urls depending on the path a user takes on your website to find it and that’s where our old friend rel=“canonical” is there to help. A potential duplicate content issue can be avoided by simply telling the search engines to ignore page A and regard page B as the preferred one.
Why Are They So Important?
Google was the first search engine that made this tag known to webmasters. The primary reason for it was because it is very difficult for a search engine to determine which is the more relevant and authoritive of two different URLs that contain the same content.
When content is available in two different URLs, search engines view it as duplicate content. Since search engines have made it very clear that they do not want duplicate content, a web page that copies another’s content can be devalued, even if it’s on the same website. Canonical tags, in this sense, have contributed a lot to SEO because they have made it much easier for search engines to index the right piece of content that the webmaster wants their audience to find.
There are 2 reasons why canonical tags are important:
- It resolves any potential duplicate content issues
- It improves your user experience as visitors to the website will be shown the preferred page
In terms of the search engines it makes it much easier for the indexing of your website, which in turn will make it easier for you to start building authority on the chosen URL. The first rule of authority building is making sure that each variation of the page redirects to the canonical URL.
Although it isn’t the ranking factor that it once was, having keyword rich URLs is still a recommended best practice for SEO but only if it makes sense to do so. A handy tip for things like that is to look at it from the point of view of a user; will it help them to include keywords in the URL?
If you have a website with many pages it’s important that you have a descriptive URL for each page. When you apply canonical URLs in your website, keep in mind that internal links are valuable signals. All your links should be pointing to URLs labelled as canonical in the head tags to avoid sending conflicting messages to the search engines. You can use redirects to solve potential duplicate content issues but nominating a canonical url is pretty pain free and it allows you to keep the less important pages on your site.
Brad Millar gives a good analysis of the pros and cons of 301 redirects vs canonical and the take away from it is that although there are many cases in which a 301 redirect is the preferred method, canonical is the most sensible choice in instances where you have product pages or if there are multiple URLs for the same piece on content.