Canonical URLs: What are they and why are they important?

Published 23rd March 2011

A strange word yet one you might have seen in your HTML and kicking about the SEO world. The word canon simply means”official”. Hence canonical URLs basically indicate which URL is the “official” URL for your website. Consider the following URLs:

All of the above URLs display the same web page. Yet as far as search engines are concerned these are all different. Don’t worry, there is no penalty for these pages appearing as “duplicate content”, however they will have a negative effect on your page ranking. So what can you do?

301 Redirect

Well you can choose to use a 301 permanent redirect which redirects everything to one URL (using .htaccess on Apache for example). The big advantage of a 301 redirect is that it keeps things neat for the search engines and makes it less confusing for your visitors. The downside however is that it makes it harder to track which URL is getting the most hits. Therefore, you may want to instead use the canonical URL tag in your website.

Canonical URL Tag

The canonical URL tag simply tells search engines that the page they are visiting is a copy of the page at your main website and to treat it as such. To use the canonical URL tag you would use the following code in your website :

<link rel="canonical" href="" />

Simple but maybe not as neat as solution as the 301 redirect. The other time this tag can come in useful is when your site has identical or vastly similar content that’s accessible through multiple URLs (for example when your pages have completely identical content, but with different URLs, due to things such as a tracking parameters or a session ID’s). Then you could specify a single URL in a canonical tag and search engines would know it was the same page.

For more information see this article from the Google Webmaster Blog.