Avoid URL canonicalisation problems with good SEO

littledetails.co.uk
make a big difference

SEO Web Design Affiliates
Join our SEO & web design affiliate scheme »

What is canonicalisation?

Canonicalisation occurs when your web site can be accessed and viewed in the browser using both the basic URL (domain name) and the URL with the 'www' prefix. For example, the correct URL to access this site is www.littledetails.co.uk and not littledetails.co.uk. If your site can be accessed and viewed both ways you run the risk of being penalised by search engines for having duplicate content. At the very least, you may force a search engine to choose which of your URL's it thinks is the most important, and if it chooses a different one to you, you may find yourself working to promote a domain name that search engines do not rank. As people are used to writing the 'www' prefix when entering a domain name, you may wish to use this as your default URL.

How can I avoid the canonicalisation problem?

The best, simplest and quickest way to avoid a canoicalisation problem is by using an .htaccess file. The .htaccess file is a simple text file that sits in the root directory of your server alongside all of your other code. Simply ensure your .htaccess file contains the following lines of code:

Options +FollowSymlinks
RewriteEngine On

RewriteCond %{HTTP_HOST} ^your-website-here\.com [NC]
RewriteRule ^(.*) http://www.your-website-here.com/$1 [R=301,L]

use the htacess file to avoid canoicalisation problems

Note: This method only works on Linux servers having the Apache Mod-Rewrite module on.

Don't forget to change the URL shown here to your own domain name. Once you have added or updated your .htaccess file with this code, test your URL by typing in to the address bar both versions of your site and seeing what happens. You should be automatically directed to the 'www' version of your URL.

If you are not sure how to edit your .htaccess file please email our web design and SEO FAQ team at faqs@littledetails.co.uk.

Bookmark this page:

© 2018 littledetails.co.uk seo web designs | privacy policy | terms and conditions | seo sitemap