Redirect www to non-www

If you want redirect users from www to a plain, non-www domain, insert this configuration

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Save and exit. The changes should go into effect immediately. Note that if you are using HTTPS, you should update “http”, in the RewriteRule line, to “https”.

Leave a Reply

Your email address will not be published. Required fields are marked *