Forum Moderators: phranque

Message Too Old, No Replies

Migrating site using redirects.

Migrating site using redirects and Google index.

         

discountofficeitems

9:01 pm on Jun 10, 2009 (gmt 0)

10+ Year Member



In anticipation of launching a re-design of our site, we purchased a new web server and began migrating our old site onto it.

To do that, we set up a new DNS entry called www1.ourdomain.com and pointed it at our new server. We then (on 02/10/09) added a site-wide temporary redirect (shown below) to redirect users to the new server at www1. The purpose of this was to avoid DNS caching from sending people to the old server instead of the new one during the first few days of the change-over.

RewriteRule ^(.*)$ http://www1.example.com/$1?%{QUERY_STRING} [L,R]

Later, we pointed the original domain (www.ourdomain.com) to the new server. We then put in a permanent redirect (shown below) on our new server to make sure any incoming links on www1 were redirected to www.

RewriteRule ^(.*)$ http://www.example.com/$1?%{QUERY_STRING} [L,R=permanent]

Earlier this month we launched our new site, and since then we've noticed that the number of indexed pages (using the site: operator in Google) has gone up for the www1 version. In theory, since we're using a permanent redirect, this number should be decreasing, not increasing.

My question being what, if anything, about the above described process might cause the number of pages indexed under www1 to be climbing right now?

Is/was this the correct way to migrate a site in such a way that Google remains happy? Should I just give it some more time and check back in a couple weeks?

[edited by: jdMorgan at 10:23 pm (utc) on June 10, 2009]
[edit reason] example.com [/edit]

jdMorgan

10:16 pm on Jun 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The increase is likely due to latency in Google's processing and database-update distribution to their many data centers.

A better plan would have been to set the TTL on your DNS record to a shorter time (like 15 minutes, instead of 24 hours) a few days ahead of the change, which would have allowed a clean switch-over and thus avoided all the confusion due to to this "redirect www to ww1, now don't redirect, now redirect www1 to www" hopping about. To personify Googlebot, you've probably annoyed it.

An alternative would have been to set up a reverse proxy targeting the server's IP address instead of the www1 subdomain.

Luckily, permanent problems are unlikely, and the best solution is to take a week off or go work on something else. Google returns search results to users in milliseconds, but everything else they do takes days, weeks, or months.

BTW, your rules are more complex than needed, because the default handling of query strings is to simply pass them through rewriterules unchanged. You could use the shorter/simpler/faster rule


RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

and the function would be identical to your last rule above.

Jim

g1smd

5:17 pm on Jun 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Another issue might be that one of your redirect rules generates a 302 not a 301.