Why the old address lives on after you change the DNS record
TTL, negative caching and planning a move
Lowering TTL does not shorten an already-cached answer. Negative caches, stale serving and existing connections complicate migrations.
You change a DNS record to the new server and still reach the old one. Updating the authoritative source does not send an invalidation message to every cached copy.
An authoritative server publishes its zone's data. A recursive resolver obtains answers for clients and may cache them. Browsers and operating systems may add further caches.
TTL is time remaining, not a fresh timer at every layer
A cached DNS answer has a remaining lifetime. In normal caching, a resolver does not reset it to the original TTL on every client query, and it may evict the answer earlier.
Assume updates are available at the authoritative servers, with no prefetch or Serve Stale:
| Time | Event | |---|---| | 09:00 | Resolver caches api.example.com → 192.0.2.10, TTL 3,600 seconds | | 09:10 | Owner changes address to 192.0.2.20 and TTL to 60 | | 09:20 | Client asks that same resolver |
The resolver can still return the old address with roughly 2,400 seconds remaining. The new one-minute TTL has not reached that cached answer.
Another resolver without the old copy may already return the new address. Both observations can be consistent.
Failures are cached too
NXDOMAIN means the name does not exist. If someone queries a planned name before you create it, a cached negative answer may outlive its creation.
For applicable negative answers under RFC 2308, the negative-cache TTL is based on the smaller of the SOA record's TTL and SOA.MINIMUM. SOA TTL 900 and MINIMUM 300 yield 300 seconds before possible resolver policy reductions.
Create the name a minute later and the negative copy may remain for another four minutes.
NODATA differs: the name exists but has no data of the requested type, such as A existing without AAAA. SERVFAIL is not proof that the name is absent.
Expiry is not a promise of immediate traffic migration
RFC 8767 describes serving stale DNS data under defined conditions, for example when refreshing from authoritative servers fails. This is different from ordinary fresh-cache use; inspect resolver behavior rather than assuming TTL is an absolute upper bound on every answer.
Application caching, record chains and already-open connections also matter. A DNS change does not move an established TCP connection to another server.
Plan a move
1. Lower TTL before the move and allow the previous TTL to elapse. 2. Prepare and verify the new destination, including names that might have negative caches. 3. Change the authoritative record. 4. Inspect responses from relevant resolvers and actual traffic. 5. Keep the old target available until traffic and existing connections drain. 6. Raise TTL again when stable.
Short TTLs increase refresh traffic and dependence on working resolution. They also do not reverse a move instantly.
Check yourself
At 11:00 a resolver caches an address for 600 seconds. At 11:01 the owner changes the address and lowers TTL to 30. At 11:05 that ordinary cached copy may still return the old address with 300 seconds remaining.
Distinguish the authoritative answer, a specific resolver's current cache and the destination of an existing connection before declaring the change broken.