Start with what the old server is actually receiving
BASH
# Count requests per client IP on the old server (Nginx path shown; Apache
# and control panels such as cPanel keep per-domain logs elsewhere)
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -20
# Watch new requests arrive in real time
tail -f /var/log/nginx/access.logConfirm the authoritative nameservers serve the new record
+norecurse flag asks the server to answer from its own zone data instead of looking the name up elsewhere.
BASH
# Which nameservers are authoritative for the domain
dig NS example.com +short
# Ask one of them directly for the A record
dig @ns1.example-dns.net example.com A +norecurse +noall +answer
# Then ask several public recursive resolvers what they hold right now
for r in 1.1.1.1 8.8.8.8 9.9.9.9; do
echo "== $r"
dig @"$r" example.com A +noall +answer
doneRead the remaining TTL from recursive resolvers
TEXT
Illustrative output format (TTL values are illustrative examples)
== 1.1.1.1
example.com. 243 IN A 203.0.113.20
== 8.8.8.8
example.com. 61842 IN A 198.51.100.10
== 9.9.9.9
example.com. 300 IN A 203.0.113.20Why lowering the TTL didn't help
- A visitor's resolver fetches the record at hour 0 and caches the old IP for 24 hours.
- At hour 1 you lower the TTL to 300 seconds.
- At hour 2 you change the IP to the new server.
- That resolver doesn't ask again until hour 24, so it serves the old IP until then.
- Some resolvers enforce their own minimum or maximum cache time and ignore very short TTLs.
- Browsers and operating systems keep their own small DNS caches, so a tab that stayed open may keep using the old IP until it reconnects.
- Keep-alive and HTTP/2 connections opened before the switch keep talking to the old server until they close.
Confirming the cutover has finished
- The authoritative nameservers return the new IP.
- Repeated samples from several public resolvers return the new IP with a TTL at or below the new value.
- Real visitor traffic in the old server's log has dropped to stray clients you can identify, such as monitors or hardcoded integrations.
