How to Transfer Site From old Domain to Other without Rank Loss
Some time you may decide to change your domain name from http://www.example.com to http://www.example.org due to any reason or just for rebranding. But moving a website from one domain to another is just like moving your office from one city. And moving this office could be an easy task or some time very difficult. As it depend how far you are moving and how you are going to mange your new office and how you have informed your old coustomers that you are moving to a new location. Almost same is true for moving a website from one domain to another as with your old domain you have 1) search engine rank 2) search engine indexation 3) search engine keywords optimization 4) your backlinks 5) Many visitors have already bookmarked you
And by simply moving your website and altering website files from one domain to an other your site visitors via search engine may get “Error 404 – File not found”. as search engines have indexed your entire site and pages.
Now you have to redirect all the direct and search engine traffic from your old domain to new domain. If you have moved your entire website as such without changing any file name you position you can use 301 as 301 Moved Permanently is used for permanent redirection of domain or webpage. 301 redirect is the most efficient and Search Engine Friendly option by which you can save your search engine indexation and ranks.
Here is a 301 redirect global code. You can use this code in your .htaccess file over an Apache web server
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
or If you need to redirect http://example.com to http://www.example.com
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
What is a .htaccess file?
When a visitor or a search engine spider requests a web page, your web server first checks for a .htaccess file. The .htaccess file contains specific instructions for certain requests, which include security, redirection issues and how to handle different errors. .htacces file is nothing but a simple text file with some codes in it and you can write it in any text editor.
If you want to redirect a specific page only then you can add this line to your .htacces file
redirect 301 /olddir/old.htm http://www.yourdomain.com/new.htm
Make sure you replace example.com with your own domain name. .htaccess does not work if you’re on a windows server,
Some other redirect codes
ColdFusion Redirect
<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=”http://www.new-url.com”>
PHP Redirect
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.new-url.com” );
?>
ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://www.new-url.com/”
%>
ASP .NET Redirect
JSP (Java) Redirect
<%
response.setStatus(301);
response.setHeader( “Location”, “http://www.new-url.com/” );
response.setHeader( “Connection”, “close” );
%>
CGI PERL Redirect
$q = new CGI;
print $q->redirect(”http://www.new-url.com/”);
Ruby on Rails Redirect
def old_action
headers["Status"] = “301 Moved Permanently”
redirect_to “http://www.new-url.com/”
end


[...] to my earlier post you may wish to check the response header or http-header for your domain or url to verify that is [...]