Why redirect if both URLs work fine without it?
Search engines consider http://wpthemesgallery.com and http://www.wpthemesgallery.com as two difference websites. So, when other websites link to you, they might not all choose the same URL, splitting the link popularity of your website. By 301 redirecting, this is fixed, and the link popularity from both URLs are combined into one.
How to redirect?
These are the instructions of how to redirect on an Apache server:
- Download the .htaccess file from your website’s root folder;
- Add the following code to it:
- Replace wpthemesgallery with your website’s URL;
- Replace the old .htaccess file with the new one.
- Try visiting the non-www URL and if it redirects to the www URL, you’re done!
RewriteEngine On
RewriteCond %{HTTP_HOST} ^wpthemesgallery.com
RewriteRule (.*) http://www.wpthemesgallery.com/$1 [R=301,L]
If you are using WordPress and have been getting errors after the redirect, do the following:
- Log in to the admin section of your WordPress blog;
- Click on Options;
- Add www to the WordPress address and Blog address URLs.
This should work and now you won’t get any more errors that were caused by the redirect.
















I have done the above but still my site will produce a Forbidden error whats up?
php_value upload_max_filesize 30M
php_value post_max_size 30M
AddHandler php5-script .php
# BEGIN WordPress
RewriteEngine On
RewriteCond %{HTTP_HOST} ^whereweplay.com
RewriteRule (.*) http://www.whereweplay.com/1 [R=301,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Well, it looks like you figured it out.
Great job in covering the 301 redirect issue, not many website owners understand the damage this is doing as link fragmenting is becomming more popular without webmasters knowledge. You done a great job covering it along with giving directions on how tho solve it.
For a full resource on 301 redirect look at: http://w3seo.org/w3seo-web-development-web-design-forums/programming-forums/p130-a-guide-to-301-redirect-information-codes/