Add the following code into your .htaccess file: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^yoursite.com [NC] RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L, R=301] Code (markup):
Follow what Richie has told ... also to know more on 301 http://www.gnc-web-creations.com/301-redirect.htm
You can check with your hosting company and ask them to change the host header to that both URLs i.e. with www and without www lead to the same URL. i.e when someone types in without the www, it will redirect to the site with the www.