How to Flush DNS & Check DNS Propagation

To flush DNS, open a terminal and run the command for your system: ipconfig /flushdns on Windows, sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder on macOS, or sudo resolvectl flush-caches on Linux. This clears saved lookups so your device fetches fresh DNS records right away.

Key takeaways

  • Flushing DNS clears your device's saved address book so it re-checks the current records.
  • Each system has one command: ipconfig /flushdns (Windows), the two-part dscacheutil command (macOS), resolvectl flush-caches (Linux).
  • Also clear your browser cache and, if needed, restart your router — they keep their own copies.
  • Propagation is the wait for a DNS change to reach everyone; it can take up to 24–48 hours and is set by the record's TTL.
  • Check propagation worldwide with whatsmydns.net, or on your own machine with dig or nslookup.

What DNS cache and propagation actually are

Every time you visit a site, your computer has to translate the name (like example.com) into a numeric IP address — the internet's version of a street address. That translation is a DNS lookup. If your device asked for it from scratch every single time, browsing would feel slow.

So your system keeps a DNS cache — a short-term memory of recent lookups. The catch is that this memory lives in several places at once: your operating system, your browser, your router, and your internet provider's resolver (the server that answers lookups for you) each store their own copy. That layering is great for speed, but it means a name you looked up an hour ago may still point to yesterday's address.

That is exactly why flushing matters. When you move a site to a new server or change a record, the address changes — but a stale cache keeps sending you to the old IP until the saved copy expires. Flushing the cache forces a fresh lookup right now instead of waiting. If DNS itself is new to you, our guide to what DNS is and how it works covers the fundamentals.

DNS propagation is the related idea. When you edit a record at your DNS host, that edit is instant on their side, but every cache around the world still holds the old value until it expires. Propagation is the time it takes for the change to be seen everywhere as those caches expire and refresh. It is not one flip of a switch — it is thousands of caches timing out on their own schedules, which is why one person may see the new site while another still sees the old one.

How long each cache holds a record is set by its TTL, short for Time To Live — a value in seconds attached to every DNS record. A TTL of 3600 means "keep this for one hour." Because providers and resolvers apply TTLs a little differently, full propagation commonly takes up to 24–48 hours, even though many people see the change much sooner.

Flushing only clears the caches you control — your device, browser, and router. It cannot speed up your provider's resolver or anyone else's cache. That larger wait is propagation, and TTL sets its pace.

How to flush your DNS cache on each system

Pick your system below. Each flush takes under a minute, and none of it affects your files or settings — you are only clearing a temporary list of recent lookups.

Windows and macOS

  1. Windows — open Command Prompt. Press the Windows key, type cmd, and open Command Prompt. Type ipconfig /flushdns and press Enter. You should see the message Successfully flushed the DNS Resolver Cache.
  2. macOS — open Terminal. Open Terminal from Applications › Utilities. Run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder, then enter your Mac password when asked. There is no success message — a silent return means it worked.

Linux (systemd)

Most modern Linux desktops manage DNS with systemd. Open a terminal and run one of these:

  1. Run sudo systemd-resolve --flush-caches on older releases, or
  2. Run sudo resolvectl flush-caches on newer ones. Both do the same job; use whichever your system recognizes.

Browser cache

Browsers keep their own DNS cache on top of the operating system's. In Chrome, clear it like this:

  1. Type chrome://net-internals/#dns into the address bar and press Enter.
  2. Click Clear host cache. Firefox and Edge have similar internal pages, or you can simply restart the browser.

Router

Your home router caches DNS for every device on the network, so it can quietly serve an old address even after each computer is flushed. The simplest fix is to restart the router — power it off, wait about 30 seconds, and turn it back on. That clears its cache along with everything else.

How to check DNS propagation

Flushing fixes what you see locally. To find out whether a change has reached the rest of the world, you need to check propagation — and there are two easy ways.

Use an online propagation checker

A tool like whatsmydns.net queries your record from servers in many countries at once, so you can watch a change spread across the map. Enter your domain, choose the record type (for example A for a website's IPv4 address), and run the check. Green ticks showing your new IP mean those locations have updated; anything still showing the old value simply has not expired its cache yet. When every location matches, propagation is effectively complete.

Use command-line tools

You can also query DNS directly from your own machine. Two commands do the job:

  • dig example.com A — the standard tool on macOS and Linux. Look at the ANSWER SECTION in the output: the IP address listed there is the value your resolver currently returns, and the number beside it is the remaining TTL in seconds.
  • nslookup example.com — available on Windows, macOS, and Linux. It prints the Address your system resolves the name to. If that address matches your new server, your resolver has picked up the change.

Reading the result is straightforward: if the returned IP is your new address, that path has updated; if it is still the old one, that cache has not expired yet. Query again after the TTL you set has passed.

Tip: lower the TTL before a planned change

If you know a DNS change is coming — a server move or a new mail provider — you can make it propagate faster by planning ahead. About a day before, lower the record's TTL to something short, such as 300 seconds (five minutes). Save it and wait for the old, longer TTL to expire everywhere.

Now, when you make the real change, caches only hold it for five minutes instead of hours, so the switch spreads across the internet quickly. Once everything looks stable, raise the TTL back to a normal value like 3600 to keep lookups efficient. A little planning turns a two-day wait into a short one.

Short TTLs mean more lookups and slightly more load, so keep them low only around a change. Restore a higher TTL once the new record is confirmed everywhere.

Common mistakes to avoid

A flush clears your caches, not the whole internet. Expecting a DNS change to appear everywhere the instant you save it is the number-one cause of needless panic. Give it the TTL you set, then re-check — the record is almost always fine.

Three slip-ups trip people up most often:

  • Expecting changes instantly. Propagation is a wait, not a button. Until the old TTL expires, many caches will keep serving the previous address no matter how many times you flush.
  • Editing the wrong record. Changing an A record when the site is actually driven by a CNAME, or updating the root domain but not the www version, makes it look like nothing happened. Confirm which record type and hostname really points to your server before you edit.
  • Forgetting the browser cache. You can flush the operating system, restart the router, and still see the old site — because the browser kept its own copy. Clear the browser cache too, or test in a private/incognito window to be sure.

If you have flushed everything and a site still refuses to load with a name-related error, the cause may be elsewhere. Our guide to fixing the DNS_PROBE_FINISHED_NXDOMAIN error walks through the next checks.

Frequently asked questions

How do I flush my DNS cache?

Run the command for your system in a terminal. On Windows, open Command Prompt and run ipconfig /flushdns. On macOS, open Terminal and run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. On Linux with systemd, run sudo resolvectl flush-caches. For a full refresh, also clear your browser cache and restart your router.

How long does DNS propagation take?

Commonly up to 24–48 hours for a change to be seen everywhere, though many people see it within an hour or two. The exact time depends on the record's TTL and how the various resolvers along the way apply it. Lowering the TTL a day ahead shortens the wait.

Why do I still see the old site after changing DNS?

Because a cache somewhere is still holding the old address. Your device, browser, router, or your provider's resolver may not have expired the previous record yet. Flush your device and browser cache and restart your router; if it persists, the record simply needs more time to propagate, or you may have edited the wrong record type.

How do I check if DNS has propagated?

Use an online checker such as whatsmydns.net to see your record from many locations at once, or run dig example.com A or nslookup example.com on your own machine. When the returned IP matches your new server across locations, propagation is done.

What is TTL?

TTL stands for Time To Live. It is a value in seconds attached to each DNS record that tells caches how long to keep it before checking again. A TTL of 3600 means one hour. Lower TTLs make changes propagate faster; higher TTLs reduce lookups.

Does flushing DNS delete anything important?

No. Flushing only clears a temporary list of recent name-to-address lookups. Your files, passwords, bookmarks, and browsing history are untouched. Your device simply performs fresh lookups the next time you visit a site, which takes a few extra milliseconds once.

Do I need admin rights to flush DNS?

On Windows the standard ipconfig /flushdns works for most users, though some setups need an elevated Command Prompt. On macOS and Linux the commands use sudo, so you will be asked for your account password. That is normal and expected.

Summary

Your device, browser, router, and provider all cache DNS lookups for speed, and a stale cache is what keeps pointing you to an old address after a change. Flushing clears the caches you control — ipconfig /flushdns on Windows, the dscacheutil pair on macOS, resolvectl flush-caches on Linux, plus the browser and router. What you cannot flush is the wider internet: that is propagation, governed by TTL and often finished within 24–48 hours. Check progress with whatsmydns.net, dig, or nslookup, and lower your TTL ahead of a planned change to speed things up. For the bigger picture of how names turn into addresses, read our guide to what DNS is and how it works.

References

Bitrich777 Hosting Team
About the author

The editorial team behind the Bitrich777 Hosting Help Center — practical, tested guides on web hosting, WordPress, servers, DNS, SSL, email, security and migration. Every walkthrough is reproduced on a live host before it is published.

Spotted an error? Tell us