Thursday, July 23, 2009

Permanent Redirect To New Website

Just moved your previous website into the new one? How do you inform your site visitors and search engines (keeps page ranks, hopefully) about your site’s new location? Go through the further steps given below.…

301 permanent redirect and URL rewrite is the answer.

Just modify the .htaccess file in the root directory of oldsite.com to the following:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^oldsite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.oldsite.com$ [OR]
RewriteCond %{HTTP_HOST} ^weblog.oldsite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.subdomain.oldsite.com$
RewriteRule ^(.*)$ http://www.newsite.com/ [L,R=301]

Note: This will do a permanent redirection on both domain (oldsite.com) and subdomain(subdomain.oldsite.com) to http://www.newsite.com

Now, user will redirect (seamlessly) to your new website, on every old links they follow. Search engine will also follow the old site links to your new site. Never lost your site visitor again!

No comments:

Post a Comment