Ask the source directly
The only answer that involves no cache at all comes from one of the domain's authoritative name servers. Everything else is a copy with an expiry time. Pick your tool and approach:
Only inserted into the commands in your browser.
Ask the authoritative server · dig · Linux, macOS
The first line lists the domain's name servers, the second asks one of them directly (replace ns1.example.net with a name from the first answer). The aa flag means authoritative answer, no cache involved. The TTL shows its full value.
dig +short NS example.com
dig +norecurse A example.com @ns1.example.net;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; ANSWER SECTION:
example.com. 300 IN A 192.0.2.10Ask the authoritative server · nslookup · Windows, Linux, macOS
The name server goes last. If the line "Non-authoritative answer" is missing from the reply, it came straight from the source.
nslookup -type=NS example.com
nslookup -type=A example.com ns1.example.netServer: ns1.example.net
Address: 192.0.2.53#53
Name: example.com
Address: 192.0.2.10Ask the authoritative server · PowerShell · Windows
-Server asks the given name server instead of the Windows resolver, -DnsOnly switches off LLMNR and NetBIOS, -NoHostsFile skips the hosts file. That keeps the local cache out of the picture.
Resolve-DnsName -Name example.com -Type NS -DnsOnly
Resolve-DnsName -Name example.com -Type A -Server ns1.example.net -DnsOnly -NoHostsFileCompare public resolvers · dig · Linux, macOS
Cloudflare, Google and Quad9 in turn. The second column is the remaining TTL: 121 means this resolver keeps serving its stored copy for another 121 seconds before it asks again.
dig +noall +answer A example.com @1.1.1.1
dig +noall +answer A example.com @8.8.8.8
dig +noall +answer A example.com @9.9.9.9example.com. 121 IN A 192.0.2.10
example.com. 300 IN A 192.0.2.10
example.com. 103 IN A 192.0.2.10Compare public resolvers · nslookup · Windows, Linux, macOS
nslookup does not show the TTL. You see which value a resolver returns right now, but not for how much longer.
nslookup -type=A example.com 1.1.1.1
nslookup -type=A example.com 8.8.8.8
nslookup -type=A example.com 9.9.9.9Server: 1.1.1.1
Address: 1.1.1.1#53
Non-authoritative answer:
Name: example.com
Address: 192.0.2.10Compare public resolvers · PowerShell · Windows
The TTL column in the output is the remaining TTL at the resolver you asked.
Resolve-DnsName -Name example.com -Type A -Server 1.1.1.1 -DnsOnly
Resolve-DnsName -Name example.com -Type A -Server 8.8.8.8 -DnsOnly
Resolve-DnsName -Name example.com -Type A -Server 9.9.9.9 -DnsOnlyIf the source returns the right answer, the change is saved correctly. Whatever stale data public resolvers still hand out disappears when the TTL expires; you cannot speed that up from outside.
dig +trace: the full chain from the root
With +trace dig behaves like a resolver itself: it starts at the root servers, gets referred to the TLD servers and from there to the domain's name servers. Caches play no part. +nodnssec keeps the output readable.
$ dig +trace +nodnssec A example.com
. 518400 IN NS a.root-servers.net.
;; Received 239 bytes from 192.0.2.53#53(192.0.2.53) in 21 ms
com. 172800 IN NS a.gtld-servers.net.
;; Received 836 bytes from 198.41.0.4#53(a.root-servers.net) in 42 ms
example.com. 172800 IN NS ns1.example.net.
example.com. 172800 IN NS ns2.example.net.
;; Received 359 bytes from 192.43.172.30#53(i.gtld-servers.net) in 39 ms
example.com. 300 IN A 192.0.2.10
;; Received 72 bytes from 192.0.2.53#53(ns1.example.net) in 24 msThe output is trimmed to one line per level here. Read it from the bottom: the last "Received … from" line names the server that gave the final answer. The block above shows which name servers the registry lists for the domain. If those are still the old ones, the name server change never reached the registrar.
If +trace stops with "connection timed out; no servers could be reached", your router does not hand out the root server list. Name a public resolver for the first step: dig +trace A example.com @1.1.1.1.
Flush the local caches
When the source has the new value but your machine does not, clear the operating system cache. The next lookup is fresh, though it still goes through your router and ISP, which cache on their own.
# Windows (Command Prompt or PowerShell)
ipconfig /flushdns
Clear-DnsClientCache
# macOS
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
# Linux with systemd-resolved
sudo resolvectl flush-cachesOn Windows both commands do the same thing. Browsers keep a cache of their own; a private window or a browser restart gets around it. A home router usually only forgets on reboot, so for testing it is easier to name a different resolver.
Test the website before DNS has moved
A server migration often needs the opposite: reach the new server while DNS still points at the old one. curl can override name resolution for a single request, no hosts file needed.
curl -sI --resolve example.com:443:192.0.2.10 https://example.comThe request goes to 192.0.2.10 but sends the real host name, so certificate and virtual host match. If nothing answers at that address, curl gives up after the timeout with exit code 28.
What the results tell you
Typical pictures and their causes:
- Source new, resolver old: caching; the remaining TTL in dig's output says for how long. Lower the TTL in good time before the next migration.
- The name servers disagree: the secondary has not picked up the zone yet. Compare the serial number in the SOA record of both servers.
- Status REFUSED from a name server: it does not host the zone. The domain is delegated to servers where it is not (or no longer) configured.
- +trace ends at the old name servers: the delegation at the registry is unchanged; the switch was not saved at the registrar or is still being processed.
- New value everywhere except the office: an internal DNS server with its own zone for the domain (split DNS), common in Windows domains.
- NXDOMAIN sticks: "does not exist" is cached too, for the smaller of two values, the TTL of the SOA record and its last field (minimum), as RFC 2308 defines.
Checking without a terminal
The DNS propagation checker runs this comparison in one step: it reads the authoritative name servers and asks twelve public resolvers whether they already return the same value. Planning the TTL ahead of a move is covered in the DNS migration guide.