DNS Caching
DNS records are cached at every layer between you and the authoritative nameserver. Caching is what makes the internet fast — but it's also what creates the appearance of slow DNS "propagation" after you change a record.
Layers of cache
- Application cache — browsers (Chrome, Firefox) keep their own DNS cache, usually for 60 seconds or until the tab is closed.
- OS cache — Windows, macOS, and Linux all cache DNS at the operating-system level. Flush with
ipconfig /flushdns,sudo dscacheutil -flushcache, orsudo resolvectl flush-caches. - Recursive resolver cache — this is the big one. Your ISP's resolver, or
1.1.1.1, etc. They honor (mostly) the TTL on the record. - Authoritative nameserver — no caching here; this is the source of truth.
Negative caching
Resolvers also cache absence. If a resolver looks up a record and gets NXDOMAIN, it caches the "no such record" answer for the duration of the SOA's minimum TTL (typically 1 hour). This is why a freshly-created subdomain may not resolve at every resolver immediately — some have a cached "doesn't exist" answer that hasn't expired yet.
How long does cache last?
Up to the record's TTL — but no longer (in theory). Some ISP resolvers ignore short TTLs and cache for hours regardless. There is no way to force a third-party cache to drop early.