DNS TTL and Propagation: How to Plan a DNS Change Without Downtime
"Wait up to 48 hours for DNS to propagate" is advice that hides what is really going on. DNS changes spread at a speed you largely choose in advance, through one number on each record. Set it well and a server move is visible worldwide within minutes.
Where the delay comes from
When someone visits www.example.com, their device asks a recursive resolver: usually one run by their internet provider, or a public one such as Google's 8.8.8.8 or Cloudflare's 1.1.1.1. If the resolver does not already know the answer, it asks the domain's authoritative nameservers, gets the record, and keeps a copy in its cache. Every record carries a TTL (time to live) in seconds, and the resolver may reuse its copy until that time runs out.
So when you edit a record, your authoritative servers have the new value at once, but every resolver that cached the old one keeps serving it until its copy expires. Nothing is broadcast. "Propagation" is just thousands of independent caches expiring at different moments, depending on when each one last fetched the record.
The worst case for a record change is therefore roughly the TTL that was on the record before you changed it. That point is the one most people miss: lowering the TTL at the same moment as changing the address does not help visitors whose resolvers cached the old record with the old TTL.
Typical TTL values
| TTL (seconds) | Equals | Typical use |
|---|---|---|
| 60 to 300 | 1 to 5 minutes | Records about to change, failover setups, load-balanced services |
| 3,600 | 1 hour | A sensible default for most website records |
| 14,400 to 86,400 | 4 hours to 1 day | Records that rarely change, such as MX and verification TXT records |
| 172,800 | 2 days | Common on nameserver (NS) delegations in top-level domain zones |
A short TTL has a cost: resolvers ask your nameservers more often, and each visitor whose resolver has an expired copy waits slightly longer for the first lookup. For most sites the difference is small, but there is little reason to keep TTLs at 60 seconds permanently.
A timeline for moving a website
Say www.example.com has an A record pointing to the old server with a TTL of 86,400 seconds (one day), and you are moving to a new server.
- At least one old TTL before the move (here, a day or more): lower the TTL on the records that will change to 300 seconds. Leave the address alone.
- Wait for the old TTL to pass. After 24 hours, every resolver that cached the record has either expired its copy or refreshed it with the new 300-second TTL.
- Prepare the new server so it can serve the site before any traffic arrives, including its TLS certificate if it can be issued in advance.
- Change the A (and AAAA) record to the new address. Within about five minutes, nearly all resolvers will be asking for and getting the new value.
- Keep the old server running for a while. A few clients and resolvers hold on to answers longer than they should, and long-lived connections may stay open.
- Raise the TTL again to an hour or more once the new server is confirmed working.
If you forget step 1 and change the record directly, the move still works. It just takes up to a day for the last visitors to see the new server, and during that time some see the old one.
Nameserver changes are different
Moving a domain to a new DNS host means changing its NS records at the registrar, which updates the delegation in the top-level domain's zone (for example, the .com registry). Those delegation records carry the registry's TTL, often two days, and you cannot lower it. To make a nameserver move painless:
- Copy every record to the new DNS host before switching, and check that the new nameservers answer correctly by querying them directly.
- Keep the old DNS host serving identical records for a few days after the switch, so it does not matter which nameservers a resolver still uses.
- If the domain uses DNSSEC, follow the new provider's procedure for DS records carefully. A mismatched DS record makes the domain fail to resolve for validating resolvers, which looks like a total outage.
Negative caching
Resolvers also cache the answer "this name does not exist". If you look up new.example.com before creating it, the resolver remembers the failure for a period taken from the zone's SOA record (the smaller of the SOA record's own TTL and its minimum field, as set out in RFC 2308). That is why a brand-new subdomain can appear to "not propagate" for one tester while working for everyone else: the tester asked too early. Create records first, then test.
Checking what resolvers see
The DNS propagation checker asks eight large public resolvers, including Cloudflare, Google and Quad9, at once and shows each answer side by side. From a terminal you can query individual servers yourself:
dig @1.1.1.1 www.example.com A +noall +answershows Cloudflare's cached answer and the TTL remaining on it, which counts down between queries.dig @ns1.your-dns-host.example www.example.com Aasks the authoritative server directly, which shows the value you have actually published.dig +trace www.example.comwalks the delegation from the root, which is the quickest way to see which nameservers the registry currently points to.- On Windows,
nslookup -type=A www.example.com 8.8.8.8does the same job as the first command.
When every resolver agrees but your browser does not
Your own machine caches too, as do browsers and some routers. Flush them in this order:
- Operating system:
ipconfig /flushdnson Windows;sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderon macOS;resolvectl flush-cacheson Linux systems that use systemd-resolved. - Browser: restart it, or test in a private window. Chromium-based browsers also have a DNS cache clear button at
chrome://net-internals/#dns. - Router: if your devices use the router as their DNS server, restarting it clears its cache.
- Check the hosts file (
C:\Windows\System32\drivers\etc\hostsor/etc/hosts) for an old manual entry. It overrides DNS entirely and is easy to forget.
Things that are not DNS
If DNS returns the new address everywhere and the old site still appears, look elsewhere. A CDN or reverse proxy may still have the old origin configured or cached pages. A browser may be showing a cached copy of the page itself. An HTTP redirect on the old server might still be sending people somewhere. The domain lookup shows the current records alongside who operates the servers they point to, which helps separate a DNS problem from a hosting one.
Check a change right now: open the GotInfo DNS propagation checker and compare the answers from eight public resolvers.