need to be sure
We have a site that is pretty big, its dynamic but uses mod_rewrite to look static and it gets crawled very regularly.
We are going to move servers soon and because of the nature of the site and the way it works, I will have to duplicate the site on the new server, change DNS and then put a .htaccess redirect to the new server to make sure evything happens right away.
The main reason is that we cant really have orders coming in on two sql databases. It needs to all switch at once.
The question I have is will this have any repercussions with the search engines if we do it this way and if so, does anyone have any recommendations?
whoops, I mean that I am going to put the .htaccess redirect on the old server to point everyone over to the new server.
I dont know why this was moved here, the question has nothing to do with apache. It's a marketing / SEO question regarding moving servers and the methods therein... hopefully I still get a response.
> change DNS and then put a .htaccess redirect to the new server to make sure evything happens right away.
My advice would be to reverse that order, and to use the IP address of the new machine as the destination URL for a 302-Moved Temporarily redirect. As soon as DNS switches over, the redirects will stop, therefore, the temporary redirect is appropriate. It also avoids having your site spidered with an IP address listed in the search results.
Make absolutely sure that your site will work (at least temporarily) with requests to an IP address rather than to a domain name. Otherwise, you risk putting the two servers into a redirection loop, as the old server redirects to the new server by IP address, and then new redirects to a domain (which may still resolve to the old server's IP address, thus looping.
One thing you can do *now* is to go edit your DNS records, and set the time-to-live to a very short period, like 10 or 15 minutes. This will accelerate the DNS switchover when you actually do it. After the switchover has ocurred, set the time-to-live back to whatever it was before.
The important thing is to make sure that the TTL is not set up for some long period like 604800, which means that DNS only has to be re-checked with the authoritative server once a week... The current setting, if long, may affect your plans for deployment. The TTL must be set to a time period shorter than the time until you plan to switch over, with a practical lower limit of a few minutes.
Other than that, your plan is fine.
|One thing you can do *now* is to go edit your DNS records, and set the time-to-live to a very short period, like 10 or 15 minutes. This will accelerate the DNS switchover when you actually do it. After the switchover has ocurred, set the time-to-live back to whatever it was before. |
Agreed; even lower is acceptable for most (if not all) resolvers. The other advantage here is that if you need to roll it all back, you just update DNS and wait 10-15 minutes again.
(ask me how I know this. Oy.)
You also say "moving to another server", but you don't say whether you're keeping the same hostname. If you are, my preferred way of testing that everything is working ok on the new server /before/ I cut DNS over is to hack up /etc/hosts on my workstation to map www.mysite.com to the new IP address, and restart my browser. Of course, I run Linux on my workstation, so that's why I edit that file. If you're running WinXP, you can edit:
...and restart your browser (although I have seen cases where the entire computer needed to be restarted). This way, you can test your hostname against the new IP address. When it passes your tests, just remove those entries from your local hosts file and bounce your browser/workstation again to undo the change.