How to redirect non-www to www in GoDaddy
March 15th, 2012Here’s what has worked for me:
RewriteEngine on
rewritecond %{http_host} ^coolexample.com [nc]
rewriterule ^(.*)$ http://www.coolexample.com/$1 [r=301,nc]
Create .htaccess (text) file and put at root directory level.
Now if someone leaves out the “www”, it will be put in, which is good for search engines. They don’t like to find the non-www and the www version, they want one or the other.
Jill--------------
J. Olkoski
Aldebaran Web Design, Seattle
Jill Olkoski has a BS in Engineering, a BS in Computer Science and an MA in Clinical Psychology. She delights in using her advanced technical and psychological skills to help small business owners develop cost-effective and successful websites.