Move a website with minimal downtime
Changing DNS does not copy files, databases or mailboxes. Prepare and test the new environment before directing visitors to it.
Several days before the move
- Find the authoritative DNS and the TTL of records that will change.
- When possible, lower TTL about a day in advance, for example to 300–600 seconds.
- Create the website, database, SSL and mailboxes on the new server.
- Copy data and test without changing public DNS.
The switch
- Limit website changes or enable maintenance shortly before final sync.
- Synchronize databases and files.
- Change only the planned A/AAAA, CNAME or MX records.
- Verify answers from the authoritative nameservers.
- Test the website, HTTPS, forms and two-way email delivery.
After the switch
Keep the old server working for at least the previous TTL and preferably for several days. Watch for remaining web requests or mail. Return TTL to a normal value after the move is stable.
When nameservers also change, keep identical records in both old and new DNS zones during the transition. This avoids different answers depending on which authoritative server is queried.
Rollback plan
Keep the original addresses and records. If the new service fails, restore the old values. Rollback is also subject to TTL, so do not shut down the old environment too early.