Strip www off URLs at GoDaddy using .htaccess mod_rewrite
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]
3 comments
RSS feed for comments on this post.
Leave a comment
Read more
« Olympus E-620 Noise Reduction and Gradation (SAT)
Using free WordPress templates for fast & affordable redesigns »

John posted on January 22, 2010:
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
Craig posted on June 20, 2010:
Not working for me. Can anyone confirm this is still working as of June 2010?
Web Designer posted on June 8, 2011:
Not working for me either, will have to wait untill they cook up a new rewrite.