Monday, July 23, 2012

Redirecting Traffic from an Old Site to a New One


The best way to accomplish this is to redirect traffic from your previous URL manually using mod_rewrite (a convenient mod_rewrite cheat sheet) and your .htaccess file. Access to a .htaccess file is generally provided by most major shared hosting providers. The form of redirection you’re going to want is a 301 redirect.

A 301 redirect is a method of telling web browsers and search engines that a web page or site has been permanently moved to a new location. Usually a 301 redirect includes the address to which the resource has been moved. Web browsers will typically follow 301 redirects to the new location automatically, without the need for user action. A 301 redirect should be used whenever a website is moved to a new domain name (URL) so that search engines will quickly change their indices and, in theory, preserve the search engine rankings that the site had at the previous domain.

So, say you’ve gone ahead and moved your site entirely from one location to another, but maintained an identical structure for your articles. For example, if your old site was www.myoldsite.com and your new site is www.mynewsite.com, you might have addresses that used to look like this www.myoldsite.com/article1.html which now look like this www.mynewsite.com/article1.html. If that’s the case, then setting up a redirect is very simple.

You can simply add the following to your .htaccess file and completely transfer all your traffic via a 301 redirect:

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

SEO Master: Sukanto Saha

Odesk Hire Link: 
 


No comments: