I do this with all my sites. I do this to prevent dnlodge.com and www.dnlodge.com to getting indexed sepretely. I also do this because it wastes PR if you have dnlodge.com as PR 4 and www.dnlodge.com at PR 6.
If you want to redirect all non www pages (like dnlodge.com) to the www version (like www.dnlodge.com)
I wrote a quick tutorial for this a while back... here it is...
credits go to members @ www.dnlodge.com
How To: Redirect Non-WWW URLs to the WWW Version
In SEO, search engines conside site.com and www.site.com as two different domains. The one of few ways to fix this is to use .htaccess to rederect all non-www pages to the www version.
Once you do this... if someone types dnlodge.com in there address bar and press go, it will automaticly redirect to www.dnlodge.com.
This is very helpful for SEO. It also increases PR. All sites linking to your non-www version of your site wont increase the PR of the www version. But with this in use, that link will help your www version site.
Heres how to do it:
in your .htaccess in your root directory, add this code......
###### Redirect / to www ######
RewriteCond %{HTTP_HOST} ^dnlodge.com
RewriteRule (.*) http://www.dnlodge.com/$1 [R=301,L]
RewriteRule ^$ index.php
#########################
But replace all occurances of "dnlodge" in the above code snipplet with the URL of your website.
This should redirect all non www pages to the www version sitewide. Meaning that in yoursite.com/directory ... all pages will still be redirected even though its not in the root directory.
Hope this helped!



LinkBack URL
About LinkBacks





Reply With Quote
