How to Schedule a Host Migration So Visitors Never See an Error
To schedule a host migration without downtime, you cut over during a low-traffic window and keep the old server serving as a live fallback until DNS has fully propagated. The trick is to lower the TTL on your DNS records well before the move, sync the data, switch the records, and only retire the old host once you have confirmed that resolvers around the world are pointing at the new one.
Before the window: lower the TTL and prepare both sides
DNS propagation is the part people underestimate. Every record has a time to live, and resolvers are allowed to cache it for that long. If your A record has a TTL of a day, some visitors will keep hitting the old server for up to a day after you change it. So the first step happens days ahead of the migration: drop the TTL on the records you plan to change. A few minutes is a reasonable target, though some providers enforce a minimum.
dig +noall +answer example.com A
example.com. 300 IN A 203.0.113.10
That 300 is the TTL in seconds. Confirm it has actually dropped at the authoritative nameservers before you rely on it, because a change at your registrar's control panel can take time to reach the zone that answers queries.
While the TTL counts down, build the new environment. Copy the files, import the database, install the same PHP or runtime version, and match the web server config. Test the new host by pointing your own machine at it directly, bypassing DNS, using an entry in /etc/hosts or a curl --resolve call. That lets you exercise the real site on the new server without touching public traffic.
curl --resolve example.com:443:198.51.100.20 https://example.com/ -I
HTTP/2 200
server: nginx
If the site returns a healthy status and the pages look right, the new host is ready to receive real visitors.
How to schedule host migration without downtime: the cutover itself
Pick a window when traffic is lowest for your audience, not for you. Check your access logs to find the quiet hours rather than guessing. During the window, put the old site into a read-only or maintenance state only if you must, but ideally you avoid that entirely by doing a final sync of changed files and a database dump and restore just before the switch.
The switch is a DNS change. Update the A and AAAA records to the new server's addresses. Keep the old server running and serving the same content. This is the fallback: any resolver still holding the old answer keeps working, and nobody sees an error. The old host is not dead, it is just no longer the target of new lookups.
Watch propagation from several vantage points. Query public resolvers directly to see what they return.
dig @1.1.1.1 +short example.com A
dig @8.8.8.8 +short example.com A
When those return the new address, most of the internet has caught up. Some resolvers are slower, so give it the full length of the old TTL before you consider the move complete.
After the switch: verify, then retire the old host
Confirm the new server is handling live traffic by checking its access logs for requests from real client addresses, not just your own tests. Watch error rates and response times. If something breaks, you can revert by pointing the records back at the old server, which is still running and still has the data. That reversibility is the whole point of keeping it alive.
Only after the old TTL has fully elapsed and the new host has proven stable should you shut down the old server. Before you do, take a final backup of its data in case anything was written there during the overlap. Then raise the TTL back to a normal value now that the move is done.
One more detail worth handling: if you use a CDN or proxy in front of the site, its cached copies and its own DNS layer add another step. Purge the cache after the switch so visitors do not get stale pages from the edge.
What to do next
Start by checking the current TTL on your records and lowering it now, even if the migration is weeks away, because that clock has to run before anything else can. Then rehearse the cutover on a staging copy so the real window is a repeat of something you have already done once.
