Wednesday, 30 June 2010 07:57

Avoiding Duplicate Content

Written by Chris Jacoby
  • Print
  • E-mail
  • Share |
  • Be the first to comment!
Search engines consider http://www.gofishclientcatchers.com and http://gofishclientcatchers.com two different websites. As a result, if your website has been linked to from other websites using both of the two URLs, you are effectively splitting the potential benefit of valuable link popularity.

The Solution

You can use a 301 redirect on the "non-WWW" version of the URL which is basically a permanent redirect in simple terms. You can pretty much consolidate all your link popularity to a single, straightforward URL. This will help to increase your site's chance of obtaining and maintaining good rankings, especially with major search engines such as Google, Bing and Yahoo.

Steps to get this working

  1. First thing you have to know (or need to find out) is if your website hosting provider is running a linux server with Apache, and that the Apache Rewrite module has been enabled. This is a definite requirement for this code to work. In most cases your website hosting provider will have this enabled already, and should not have a problem enabling this if it has not been enabled already.
  2. Download the .htaccess file from your website's root directory (or get it here). To edit your .htaccess file open it up with notepad or a similar program. Be sure to replace mywebsite.com with your own website's domain. You don't have to edit anything else in the file unless you know what you are doing.

    Options +FollowSymLinks

    RewriteEngine On
    RewriteBase /

    #REDIRECT NON-WWW TO WWW
    RewriteCond %{HTTP_HOST} ^mywebsite\.com [NC]
    RewriteRule ^(.*)$ http://www.mywebsite.com/$1 [L,R=301]


    Note: (Make sure to escape periods in the RewriteCond line with backslashes. This mostly relates to search-engine friendliness and unity of web stats.)

  3. Upload the file back to your website's ROOT directory. If you have downloaded this file from the root directory on your website, or if you are replacing an existing .htaccess file on your website, always remember to make a backup first of the existing .htaccess file.
  4. Once the upload is complete, open your web browser and try visiting the "non-www" version of your website address. If the .htaccess is working as it should you will be redirected immediately to the full "www" version of your website. This will be reflected in your browser's address bar.
  5. If the redirect worked for you, then are done! :)
    If this did not work then you need to restore the backup you made of the .htaccess file to your website. After the backup is restored go back and review the revised .htaccess info in the file, compare the information to the instructions above and make sure there were no mistakes. If no mistakes are found your server may require some custom programming which is beyond the scope of this doc; please contact your website hosting provider for more information.
avoiding-duplicate-content
Last modified on Wednesday, 30 June 2010 08:03
Chris Jacoby

Chris Jacoby

Chris is an Information Systems Engineer who has great experience with the online web world. His strengths lie in website application development, user friendly website design and development, graphics design and website optimization. 

Nothing is impossible! ~Chris


E-mail: This e-mail address is being protected from spambots. You need JavaScript enabled to view it

Add comment



Call Us: +27 11 612 7460
LiveZilla Live Help