301 Redirect non-www to www

Simply copy and paste the code below in an existing .htaccess file at the root of your domain

RewriteEngine On
RewriteCond %{HTTP_HOST} ^
RewriteRule (.*)$1 [R=301,L]

Then replace “” on both lines with your domain name

301 Redirect non-www to www

For a complete explanation on how to 301 redirect non-www to www URLs, please visit

IT Support Newcastle is brought to you by Transcendit Ltd, contact us on 0191 482 0444