What deleting DNS actually means and why you might do it
When you type a web address into your browser, your computer asks a DNS server "what is the IP address for this website?" The answer gets stored temporarily on your device so the next time you visit, it doesn't have to ask again. Deleting DNS means clearing out that stored list of answers — called the DNS cache — so your computer forgets the old information and asks fresh questions the next time you visit a site.
You might delete DNS cache if a website has moved to a new server and you keep reaching the old one, if you're troubleshooting a connection problem, or if you want to clear out old records before selling or giving away a device. It's a low-risk action that takes a few minutes and doesn't affect your security settings or passwords.
Key Takeaways
- DNS cache is stored on your device, not on the internet, so clearing it only affects what your computer remembers about websites.
- On Windows, you open Command Prompt and type ipconfig /flushdns; on Mac, you open Terminal and type a command that varies by macOS version.
- Clearing your browser's cache separately removes the DNS records that your browser specifically has stored.
- If a website still won't load after you clear DNS, the problem is usually something else — contact your internet provider or the website's support.
How to clear DNS cache on Windows
Open the Start menu and type "Command Prompt" into the search box. Right-click on Command Prompt and select "Run as administrator" — this step matters because you need admin permission to flush the cache. A black window will open.
Type exactly this: ipconfig /flushdns and press Enter. You should see a message that says "Successfully flushed the DNS Resolver Cache." That's it — your DNS cache is now empty. Close the Command Prompt window.
If you see an error message instead, make sure you opened Command Prompt as administrator. If you did and still see an error, your device may have DNS caching turned off, which is fine — there's nothing to clear.
How to clear DNS cache on Mac
Open the Applications folder, go to Utilities, and double-click Terminal. The command you type depends on which version of macOS you're running, because Apple changed how DNS caching works over the years.
For macOS 10.12 (Sierra) and newer, type: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder and press Enter. You may be asked for your password — type it in (you won't see the letters appear, which is normal) and press Enter again.
For older versions of macOS, the command is different. If you're not sure which version you have, click the Apple menu, select "About This Mac," and look at the version number. If you're running something older than Sierra, search for "flush DNS cache [your macOS version]" to find the exact command, because it varies.
Clearing DNS cache in your web browser
Your browser keeps its own separate DNS cache on top of what your operating system stores. Clearing the system cache doesn't automatically clear the browser's version, so you may want to do both.
In Chrome, go to Settings, click Privacy and Security, select Clear Browsing Data, and check the box next to "Cookies and other site data." Set the time range to "All time" and click Clear Data. In Firefox, go to Settings, select Privacy & Security, scroll to Cookies and Site Data, and click Clear Data. In Safari, go to History menu and click Clear History, then select "all history" from the dropdown.
This clears more than just DNS — it also removes cookies and stored login information — so only do this if you're comfortable re-entering passwords on sites you visit regularly.
When DNS cache clearing actually solves the problem
Clearing DNS cache works when a website has genuinely moved to a new server and your device is still remembering the old address. You'll know this is the problem if the site works fine on someone else's device or on your phone (which has its own separate cache), but not on your computer.
It also helps if you've recently changed your DNS provider — for example, if you switched from your internet provider's DNS to a privacy-focused service like Cloudflare's 1.1.1.1. The old cached answers may point to the wrong place, so clearing them forces your device to ask your new DNS provider for fresh information.
If a website still won't load after you clear DNS, the problem is almost certainly something else: your internet connection is down, the website itself is offline, your firewall is blocking it, or there's a typo in the address. Clearing DNS won't fix any of those.
What clearing DNS does not do
Clearing DNS cache does not delete your browsing history, erase your passwords, or change any security settings. It doesn't affect what your internet provider can see about your activity — they can still see which websites you visit because they handle the traffic itself, not just the DNS lookups. It doesn't remove malware or viruses, and it won't speed up your internet unless the specific problem is that your device is trying to reach an old server address.
If you're trying to hide your browsing from your internet provider, clearing DNS won't do that — you'd need a VPN for that purpose. If you're trying to improve privacy, clearing your browser cache (which includes cookies) matters more than clearing DNS.
Frequently Asked Questions
Will clearing DNS cache delete my saved passwords?
No. DNS cache and passwords are stored separately. Clearing DNS only removes the list of IP addresses your device has looked up. Your passwords stay in your browser's password manager or password vault unless you specifically clear those too.
How often should I clear my DNS cache?
Most people never need to. Clear it only when you're troubleshooting a specific problem — like a website that won't load even though it's working for others — or when you've changed your DNS provider. There's no benefit to clearing it regularly.
What's the difference between clearing DNS and clearing my browser cache?
DNS cache stores IP addresses (the numbers that point to websites). Browser cache stores images, scripts, and other files that make pages load faster. Clearing your browser cache removes more data and affects how fast websites load. Clearing DNS only affects how your device looks up website addresses.
Can I clear DNS cache on my phone?
On iPhone, go to Settings, select Safari, and tap Clear History and Website Data. On Android, go to Settings, select Apps, find your browser, tap Storage, and select Clear Cache. These steps clear the browser's DNS cache but not the system-level cache, which is usually fine for troubleshooting.
What if the command doesn't work or gives an error?
On Windows, make sure you opened Command Prompt as administrator — right-click and select "Run as administrator." On Mac, make sure you typed the command exactly as shown, including spaces and semicolons. If you still get an error, your device may not have DNS caching enabled, which means there's nothing to clear and the error doesn't indicate a problem.