Thoughts, information and reflections about technology

Using a 301 redirect to avoid search engines seeing duplicate content.

Before you begin, be aware that errors in your .htaccess file could result in an unreachable site or loss of traffic.

It is important to ensure that search engines do not see duplicate content on your site. This can result in a penalty or dilution of your traffic. One of the more common errors is to not redirect your traffic to or vice versa. In other words, the search engines begin to believe you have two identical sites.

One site that will tell you if you have this problem is  . You simply enter your site’s address and it will provide some basic, but important SEO information.

If your site is hosted on an Apache server, you can fix this with a few  simple lines in your .htaccess file. If you are running Joomla, you should have an active .htaccess file anyway.

To do this, you should

  • Back up your existing .htaccess file. You should already be familiar with the .htaccess file and editing files using an FTP client such as Filezilla.
  • Open the .htaccess file for editing.
  • If you are using Joomla and the .htaccess file provided by the Joomla installation, you should see an area about redirecting non www pages to the www.pages.
  • Post the code below in AND modify it to reflect your site name.
  1. RewriteEngine On
    RewriteCond %{HTTP_HOST} !^$ [NC]
    RewriteRule .?{REQUEST_URI} [R=301,L]
  •  NOTE – you only have to have the RewriteEngine On line once.
  • Now TEST your site including any administrative back ends.
The site below gives some more detail as well as a means of changing the .htaccess files for frontpage and microsoft based servers.

Similar Posts:

No tags for this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact me
Recent Comments