Moving a site to a new host is one of those jobs that looks simple on paper: copy the files, copy the database, update DNS. In practice, most migration horror stories come from that last step. Email goes dark, the SSL certificate fails, or half your visitors see the old site for two days while forms submit into a server nobody is watching.
None of that is necessary. With a little planning, the DNS switch can be the most uneventful part of the whole project. This is the checklist I follow.
1. Inventory every record first
Before touching anything, export or screenshot the entire zone. Every A, CNAME, MX and TXT record, plus every subdomain. The website records are rarely what breaks. It’s the forgotten ones: the MX records for company email, the TXT record that verifies Google Search Console, the DKIM key for the newsletter tool, the staging subdomain someone set up years ago.
This matters most if you’re also moving DNS hosting, for example switching nameservers to Cloudflare. Any record you don’t recreate on the new DNS host simply stops existing the moment the nameservers change.
2. Lower the TTL a day or two ahead
Resolvers cache records for as long as the TTL says. If your A record’s TTL is a full day, some visitors will keep hitting the old server for a day after you switch. So 24 to 48 hours before the migration, drop the TTL on the records you’re changing to 300 seconds.
The timing is the important part. Lowering the TTL only helps once the old TTL has expired everywhere, so you need to wait at least that long before cutting over.
3. Test the new server before DNS changes
You don’t need DNS to see your site on the new host. You can tell your own machine where to find it. The quickest way is a line in your hosts file (/etc/hosts on macOS and Linux):
203.0.113.10 example.com www.example.com
Or, without editing any files, curl can override the lookup for a single request:
curl -I --resolve example.com:443:203.0.113.10 https://example.com/
Click through the real site this way. Test the forms, the checkout, the logins, the redirects. Anything you find now is a problem nobody else ever sees. Remember to remove the hosts entry afterward, or you’ll spend twenty confused minutes later wondering why your machine disagrees with everyone else’s.
4. Plan the SSL certificate
Most hosts issue free Let’s Encrypt certificates, usually with the HTTP-01 challenge, which only works once the domain already points at the new server. That leaves a short window where visitors can get a certificate warning. You have a few options:
- Use the DNS-01 challenge, which proves ownership with a TXT record and can issue the certificate before the cutover.
- Put a CDN or proxy like Cloudflare in front of the site so the visitor-facing certificate never changes.
- At minimum, be ready to issue the certificate the moment DNS switches, at a low-traffic hour.
Also check for a CAA record. If one exists and doesn’t list the certificate authority your new host uses, issuance will fail no matter what else you do.
5. Freeze content, then cut over
For a WordPress site, the database keeps changing right up until the switch: new comments, form entries, orders, edits from the marketing team. Agree on a short content freeze, run a final database sync, then update the A and AAAA records. Changing individual records is far faster than changing nameservers, because the nameserver records at the domain’s registry can be cached for up to two days.
Keep the old server running for at least a few days. Some resolvers ignore low TTLs, and any visitor still landing there should get a working site, not an error.
6. Verify, then raise the TTL again
After the switch, query a few public resolvers directly with dig @1.1.1.1 and dig @8.8.8.8 to confirm they return the new IP. Then check the certificate, submit every form, and send a test email to and from the domain. Once everything has been stable for a couple of days, raise the TTL back to something like an hour or a day so resolvers can cache efficiently again.
The best migration is the one nobody notices happened.
Always have a rollback
Because the TTL is low and the old server is still running, rolling back is as simple as pointing the record at the old IP again. Write that step down before you start, along with the old values, so if something goes wrong at 11 p.m. you’re following a plan instead of improvising. Next month I’ll cover the DNS records that decide whether your site’s emails reach the inbox or the spam folder.