gotinfo.net by VARØ Industries

DNS TTL and Propagation: How to Plan a DNS Change Without Downtime

GotInfo guides  |  VARØ Industries

"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)EqualsTypical use
60 to 3001 to 5 minutesRecords about to change, failover setups, load-balanced services
3,6001 hourA sensible default for most website records
14,400 to 86,4004 hours to 1 dayRecords that rarely change, such as MX and verification TXT records
172,8002 daysCommon 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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:

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:

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:

  1. Operating system: ipconfig /flushdns on Windows; sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder on macOS; resolvectl flush-caches on Linux systems that use systemd-resolved.
  2. Browser: restart it, or test in a private window. Chromium-based browsers also have a DNS cache clear button at chrome://net-internals/#dns.
  3. Router: if your devices use the router as their DNS server, restarting it clears its cache.
  4. Check the hosts file (C:\Windows\System32\drivers\etc\hosts or /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.

Related guides