How do I force the "WWW" version of my website using the .htaccess file?

  • Answered
I changed my index.html to a completely different file and when i type in it actually goes to my site but when i just type in my browser it gives me that page i got when i signed up.
Tim S.
Hi Garet, Thanks for posting your question. I'm more than happy to assist you. It appears you have already resolved the issue on your own. When I visit both URLs you have provided they display the same content. It appears now you are forcing WWW when you go to the and redirecting it. Also, many times issues like this can be corrected by first attempting to clear your browser cache. Anytime you wish to force all your visitors to the "www" version of your website, this can be accomplished by using your .htaccess file. Here is the code snippet to add to your .htaccess file:
RewriteEngine on RewriteCond %{HTTP_HOST} !^$ RewriteRule ^(.*)$$1 [R=301]
If you need further assistance, please feel free to contact us. Thank you! Tim S