Here’s how to remove the www. from your domain name so that Google won’t “split” your pagerank as a result of some inbound links going to www.foo.com and others going to foo.com. (Google will see this as two separate sites.) This tip is tuned to work at GoDaddy, where using mod_rewrite can be a real pain because GoDaddy has some unfortunate default Apache settings that prevent ordinary rewrites from working properly out-of-the-box.
Add these lines to the top of your .htaccess file:
# Override GoDaddy defaults that inhibit URL rewriting
Options -MultiViews
rewriteEngine On
# Rewrite URLs to remove www from domain name
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Exactly what I was looking for!
GoDaddy’s help guides and FAQs leave much to be desired, especially when trying to search them.
Thanx-a-ton!!
John
Not working for me. Can anyone confirm this is still working as of June 2010?
Not working for me either, will have to wait untill they cook up a new rewrite.