We have a domain with URL, lets say: http://www.xxxxstaging.com/abc.php?id=10 which is having a pretty good ranking for some keywords in google.

However, this is our staging website and due to some historical reason, it was exposed to public.

Now we have a production domain (the one we want to be publicly available), say: http://www.xxxxproduction.com/abc.php?id=10 which have exactly the same html output as xxxxstaging.com

Our question is, for the exactly same keyword search, it never appear in any page of google.

Is it possible for us to "switch" the ranking in google, either tell the robot that they are indeed the same website, or tell google to change it for us?

  • Not an answer to your immediate question but, in the future, consider using hosts file entries (like domain.staging) and/or authentication on your staging instance to ensure that staging content never gets indexed. – danlefree Mar 14 '11 at 21:08

Use a 301 redirect:

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?xxxstaging\.com$ [NC]
RewriteRule ^(.*)$ http://www.xxxlive.com/$1 [R=301,L]

This will redirect users and the search engines to the new site and the proper pages as well. Search engines will also then associate the old URLs with the new URLs and eventually replace them in the search results.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy