Force WWW

You can automatically force “www” to be added on to your URL using htaccess. This way, your URL will automatically be changed from example.com to www.example.com, even if the “www” is not typed in the address box.


RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301]