What is DNS Cache and How to Flush It

A DNS cache keeps recent domain lookups close at hand so your device does not have to resolve the same name twice. It is what makes browsing feel instant — but it also means a changed record can be served stale until the cache expires. This guide explains what DNS caching is, where it happens, and how to flush it.

What is a DNS cache?

A DNS cache is a temporary store of recent DNS lookups. Once a name has been resolved to an IP address, the answer is kept for the length of its TTL so the lookup does not have to be repeated. Caching is what makes browsing fast — without it, every link would trigger a full lookup from the root servers down.

Where DNS is cached

A single lookup can be cached in several places at once:

  • Your browser — Chrome, Firefox, and others keep their own short-lived DNS cache.
  • Your operating system — Windows, macOS, and Linux all run a system resolver with its own cache.
  • Your router — many home and office routers cache DNS for the whole network.
  • Your recursive resolver — your ISP or a public resolver (1.1.1.1, 8.8.8.8) caches answers on behalf of all its users.

Why flush your DNS cache?

You usually flush the cache when a record has changed but your machine is still using the old value — for example after moving a site to a new server, or when troubleshooting a "this site can't be reached" error that other people do not see. Flushing forces a fresh lookup.

Flushing only clears caches you control. You cannot flush a remote resolver's cache, so a stale answer there persists until its TTL expires — that is the slow part of DNS propagation.

How to flush the DNS cache

Windows — open Command Prompt and run:

ipconfig /flushdns

macOS — open Terminal and run both commands:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Linux (systemd-resolved) — run:

sudo resolvectl flush-caches

Google Chrome keeps its own cache. Visit chrome://net-internals/#dns and click Clear host cache.

How long do entries stay cached?

Each record sets its own TTL — commonly between 300 seconds (5 minutes) and 86400 seconds (24 hours). A resolver may keep the answer until that timer runs out. Lowering a record's TTL before a planned change reduces how long stale entries linger. To learn how lookups and caching fit together, start with what is DNS.

Never miss a DNS change again.
Start monitoring in minutes.