Redirecting web site visitors from www to non-www pages
In this article we explained how to redirect all traffic on your web site from non-www to www URLs. In this article, we do the reverse and explain how to redirect traffic from www to non-www URLs.
To do this, simply open your .htaccess file and add in the lines:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
Ensure that you replace 'yourdomain.com' with your actual domain name.
Once done, save the file and go to your web site and you should now be redirected to the non-www URL.