Home
/
Website Help
/
Other
/
How to redirect www URLs to non-www?

How to redirect www URLs to non-www?

If you are using WordPress or any other domain name dependent application, you should first change the URL of your application to be without www. For WordPress you can do that by following the instructions here.

To redirect all requests to non-www, add the following lines at the beginning of your website’s .htaccess file:

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

Replace yourdomain.com with your actual domain name.

Share This Article