301 Redirect Instructions – Non www to www

  September 12, 2006   Category :     Website Coding   information

Below are 301 Redirect Instructions to go from Non www to www.

Word of warning, you will have to edit your .htaccess file to accomplish this. Please be careful and always make a backup of the original just in case there is a problem.

First, open your .htaccess file with a plain text editor such as notepad. Next copy and paste the following code into the .htaccess file;

RewriteEngine on

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

Next, simply replace “yoursite” with your unique URL, save and upload. Now when somebody types in yoursite.com they will be automatically redirected to www.yoursite.com.

About The Author

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

Comments are closed.