🦆 IP Ducky

Everyday Internet & Troubleshooting

What Is a DNS Cache, and How Do You Flush It?

To avoid looking up the same names over and over, your device keeps a DNS cache. Usually it helps — occasionally it needs clearing.

Why a cache exists

Every time you visit a site, your device asks DNS to turn its name into an IP address. Doing that fresh every time would be wasteful, so your device (and your resolver) keep a DNS cache — a short-term memory of recent lookups. Repeat visits then skip the lookup entirely, making browsing faster.

Time to live

Each cached record has a time to live (TTL) that says how long it may be kept. When the TTL expires, the record is discarded and the next lookup fetches a fresh answer. TTLs are why changes to a domain's settings don't take effect everywhere instantly — old answers linger until they age out.

When to flush

Occasionally the cache holds a stale or wrong answer — for instance, right after a website moves to a new server, or when a lookup fails and the failure gets cached. Flushing the DNS cache forces your device to forget everything and look up fresh answers.

How to flush it

A common fix

"Flush your DNS" is a standard troubleshooting step when a site won't load correctly but works elsewhere, or right after DNS changes. It's harmless — the cache simply rebuilds itself as you browse. If flushing doesn't help, the issue is likely elsewhere, and tools like ping and traceroute are the next step.

🦆 Check your own IP address