The careful approach.
THE PRINCIPLE
Have the new server fully working before anyone is directed at it.
THE SEQUENCE
- Record the existing zone completely
- Lower TTLs to five minutes, a day in advance
- Build the site on the new server
- Test with a hosts file entry pointing your machine at the new address
- Check every page, forms, login, mail, and checkout
- Recreate every DNS record at the destination, if nameservers are changing
- Change the A records, or the nameservers
- Monitor
- Confirm everything works
- Raise TTLs
- Cancel the old hosting only after a week
WHY THE HOSTS FILE STEP MATTERS
It lets you verify the new server completely while the world still uses the old one.
Every migration disaster involves someone switching before testing.
WHAT IS UNAVOIDABLE
A brief period where some visitors reach the old server and some the new.
If the site takes orders, that means orders arriving in two places. Plan for it: a maintenance notice, or a quiet window.
WHAT PEOPLE FORGET
Mail. Download mailbox contents before the switch.