Your IPv4 address:
Operating system:

How does DNS caching work?

You changed a DNS record, yet some devices still open the old server. The usual reason is a cache: applications, the operating system and the recursive resolver each keep recent answers so they do not have to repeat the full lookup every time. Clearing one of those caches does nothing to the copies held in the others.

How long a cached answer lives

Every DNS record carries a TTL, the number of seconds for which a received answer may be reused. A TTL of 3600 means one hour. The resolver counts the remaining time down while it holds the record and asks again only after it reaches zero.

This has a practical consequence. If you change an address, a copy fetched earlier stays valid until its old TTL runs out. Lowering the TTL at the same moment as the address change cannot shorten the life of copies that are already out there. Lower it beforehand, at least one old TTL ahead of the change.

“No such name” is cached too

Negative answers can also be stored. Suppose a resolver asked for a name before you created it and received NXDOMAIN, the reply for a name that does not exist. After you add the record, some users can keep seeing that earlier negative answer for a while. RFC 2308 defines this negative caching behaviour.

Find which cache holds the old answer

Query three places in this order: the domain’s authoritative server, a public recursive resolver of your choice, and your own device. If the authoritative answer is still old, the problem is in the zone or its delegation, and clearing a local cache will not help. If the authoritative answer is new but your local one is old, look at the remaining TTL and try again after it expires. The 2ip DNS lookup queries a domain’s records, optionally on a DNS server you choose.

Ask for the exact record type you care about. A cached A record cannot explain a wrong MX answer, and an AAAA record may send IPv6 traffic to a different server from IPv4. Check the full hostname, including any subdomain. A browser may also use its own DNS-over-HTTPS (DoH) resolver, so it can disagree with a system utility on the same machine. If a resolver is slow to answer at all, the 2ip DNS response time test measures how quickly a DNS server replies; it does not show what that server has cached.

When clearing the cache on your device helps

It helps after a correction when your device alone keeps using the older result. The command depends on the operating system and on which resolver component is active, so identify that first; on Windows it is ipconfig /flushdns. Whatever you run locally cannot flush your provider’s cache, a public resolver or another person’s computer.

A DNS cache is also not the browser’s page cache. One holds naming information and the other holds site content. And a correct IP address does not prove that HTTP, HTTPS or a mail service works. Work out which layer gives the unexpected answer before changing settings.

A move from 192.0.2.10 to 192.0.2.20

A site moves from 192.0.2.10 to 192.0.2.20. These addresses are reserved for documentation and do not belong to a real website. The authoritative server already gives the new address, while a home router still returns the old value from its cache. A direct query to the authoritative server shows the new record. A query through the home network shows the old one together with its remaining TTL. Once that TTL expires, the two answers should agree unless some other configuration problem remains.

In a real case, write down the time of the change, the old and new values, the TTL and the answers from each named server. That record is far more useful than waiting for an unspecified moment when DNS has supposedly “fully propagated”.