Share via:

Canonical URL

A simple guide to using the Canonical URL tag, and tips on avoiding duplicated content in the SERPs.


Edited: 2018-01-24 08:46

The rel=Canonical URL allows you to tell search engines that duplicated content available on other URLs are actually the same content as that available on the Canonical URL.

When servers are configured incorrectly, or CMS systems are designed with little forethought, content may sometimes become available on multiple URLs. A common situation where this may occur, is when using the WWW subdomain. Another is when the index file (I.e. index.html), is accessible both from and

A simple way to solve this problem is to simply block requests for the index file, or redirect them to the bare domain. Another, less desirable solution, is to use the link tag with the rel=canonical attribute set. The tag can be included in all versions of the page.

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

If you are using PHP, and you want to prevent access for non-existent URL paramerters (query strings), you should see this article: Blocking Out Non-Existent URL Parameters

Canonical URL Tag

Sometimes you might not be able to configure the server properly, for whatever reason – usually due to host specific limits. In those cases, you may want to include a Canonical URL Tag, which tells the search engines which URL you want to show up in the SERPs.

Including the below code in your head section, would suggest that only be used – just replace beamtic with your own domain name.

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

SEO Benefits

Generally, there are no SEO benefits, unless you are already having problems with unwanted URLs in the search engines, but if you can not fix the problem with your site, then you may want to still include it, as it might avoid potential problems.

Canonical URL vs 301 Redirect

If possible, then you should actually avoid both. It is always best to configure your server and CMS correctly from the beginning, as it avoids all of these issues with duplicated content. Sometimes, when the damage is done, it may even be best to just throw a 404 error on the old duplicate URLs, rather than spending time redirecting each and every page.

See also

  1. Trailing slashes in URLs