The Simple Answer: What does 'Flush DNS' actually do?
Flushing your DNS clears out your computer’s 'Address Book.' When you visit a website, your computer doesn't want to ask the internet for the address every single time—that would be slow. Instead, it saves the website's IP address in a local 'Cache.' If that website moves to a new server (changes its IP), your computer will keep trying to use the old, 'dead' number. By 'Flushing' the cache, you force your computer to go back to the internet and get the correct, updated address.
Think of it as an Outdated Map. If a store moves across town, but you keep following your old paper map (the DNS cache), you’ll end up at an empty building ('Site Not Found'). Flushing the DNS is like throwing away the old map and downloading a fresh one. It solves 90% of those annoying 'This site can't be reached' errors. Check if your computer is currently following an outdated map here.
At a glance
- Windows: Open CMD as Admin -> Type
ipconfig /flushdns-> Press Enter. - macOS: Open Terminal -> Type
sudo killall -HUP mDNSResponder-> Press Enter. - Chrome: Go to
chrome://net-internals/#dns-> Click 'Clear host cache.' - Why do it? Fixed 404 errors, speeds up browsing after a site changes servers, and improves security (prevents DNS Spoofing).
- Is it safe? Yes. It doesn't delete your files or passwords; it just clears temporary networking memory.
- The Sign: If a site works on your phone (using Data) but not your PC (using Wi-Fi), you definitely need a DNS flush.
Beginner Guide: How the 'Resolver Cache' Works
To speed up the internet, your operating system maintains a 'Resolver Cache.' This is basically a list of names (google.com) and numbers (142.250.190.46).
Usually, this cache expires automatically every few minutes or hours (this is called 'TTL' or Time To Live). However, sometimes a cache becomes 'Corrupted.' This can happen due to a bad network connection, a virus, or simply because a website owner updated their domain records and your computer hasn't caught on yet. Run a 'Cache Integrity' scan and see what your computer remembers here.
Global DNS vs. Local DNS
When a website moves, it takes time for the whole world to know. This is called Propagation. Even if you flush your DNS locally, you might still see the old site if your Internet Provider (ISP) hasn't updated its own servers yet.
If a local flush doesn't work, you might need to change your DNS provider entirely to someone faster, like Google (8.8.8.8) or Cloudflare (1.1.1.1). Audit your 'ISP Propagation Speed' and switch to a faster DNS provider here.
Comparison Table: DNS Commands across Platforms
| Platform | Command Line | Difficulty |
|---|---|---|
| Windows 10/11 | ipconfig /flushdns | Easy |
| macOS (Sonoma+) | sudo killall -HUP mDNSResponder | Medium |
| Linux (Ubuntu) | resolvectl flush-caches | Medium |
| Android | Chrome net-internals (Menu) | Easy |
| iOS | Toggle Airplane Mode | Very Easy |
Common Mistakes and Practical Issues
- Not Running as Admin: On Windows, if you don't 'Run as Administrator,' the command will fail silently or say 'Access Denied.'
- The Browser Cache Trap: Sometimes your PC is clean, but your Browser has its own separate cache. You must clear BOTH for the fix to work (see the Chrome instructions above).
- Pinging the Wrong Site: Make sure you are testing the 'www' version and the non-www version separately. Sometimes one is cached and the other isn't. Scan your 'Browser vs OS' cache alignment here.
How to Flush DNS (Step-by-Step for Windows)
- Open Command Prompt: Search 'cmd' in the taskbar.
- Right-click: Choose 'Run as Administrator.'
- Execute: Type
ipconfig /flushdnsand hit Enter. - Confirm: You should see 'Successfully flushed the DNS Resolver Cache.'
- Bonus: Type
ipconfig /registerdnsto refresh your own computer's name on the network too.
How to Flush DNS on a Router
Sometimes, the bad information is stuck in your Router, not your computer. To fix this, you don't need a command; you just need to turn it off and on again. Wait 30 seconds before plugging it back in. This forces the router to dump its active memory and get fresh data from your ISP. Check your 'Router Memory Health' and DNS latency here.
Final Thoughts on Network Health
Flushing your DNS is the most powerful 'No-Cost' tool in your networking toolkit. It’s the first thing any IT professional does when they hear 'The internet is slow' or 'I can't load my website.' By mastering this simple command, you save yourself hours of frustration and ensure that you are always seeing the 'Real' Internet, not a stale memory of it. Keep your cache clean and your connection fast. Run a total 'Network Reset and DNS Refresh' audit now.