Redirect www to non-www

By | 2010/07/25

How can I redirect my website to go from to just plain ol’

Use the following rewrite blurb where appropriate for your website. An easy thing to do is to add this to your .htaccess file in your website’s root directory:

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