Nishil Patel
Jan 31, 2024
7 min read
DNS caching is great for lightning-fast app performance and quick web page loads, especially when you’re surfing with Chrome. But, if the DNS cache data gets mixed up or goes haywire, you could be hit with some pesky error messages. The solution? A good ol’ clear-out or flush of the DNS cache can set things right again. In this article, we’re gonna take a deep dive into all things DNS cache and show you how to handle any curve balls it might throw your way.
1.
Introduction
2.
What is the DNS Cache?
3.
Is it Necessary to Clear DNS Cache on Chrome?
4.
Clearing or Flushing out DNS Cache on Chrome with chrome://net-internals/#dns
5.
How to Fix DNS Cache Errors on Chrome When chrome://net-internals/#dns is Not Working?
6.
Clear or Flush out DNS Cache on Local Systems
7.
FAQs
If you’re a Chrome user, you might’ve run into some hiccups loading websites. These issues could be due to a bunch of reasons—maybe your internet’s acting up, your router’s on the fritz, or the website itself is having a bad day.
So, what’s your usual plan? You might reboot your system or close a few Chrome tabs (which are notorious RAM hogs). You give the website another shot, and voila, it works fine. Problem solved, right? Well, hold your horses.
Some of you might still be dealing with these issues. And when it comes to Chrome, one place to check out is the DNS cache. There’s a good chance that a DNS cache issue is blocking you from getting the latest version of a website or causing other errors. In such cases, you need to clear or flush the DNS cache.
Think of the DNS (Domain Name System) cache like your browser’s speed dial. It’s a temporary storage spot that keeps track of the websites you hit up the most. Just like you remember your friend’s name instead of their phone number, your browser remembers IP addresses of websites using their names.
Take ‘facebook.com’ for example. Your browser knows it as 157.240.22.35. That’s its number on the internet. This whole name-to-number thing is called DNS resolution, and it happens every time you punch in a website.
To save time and data, your browser keeps a cheat sheet, or a local copy, of the IP addresses of your go-to websites. That’s the DNS cache. It’s like having the answers before the test, letting your browser load up the pages super quick without having to ask the DNS server for the IP each time.
Nope, it’s not a must-do to always clear your DNS cache. Chrome’s pretty solid when it comes to handling cache data, so most of the time, you’re good to go. But, there are times when giving the DNS cache a good clean can really help out:
Read More: How to Report a Bug
Here’s how you can clear or flush out the DNS cache on Chrome:
Step 1: Go to chrome://net-internals/#dns
Step 2: Click on the “Clear host cache” button.
This instantly clears up the DNS cache. You don’t even need to relaunch or reload your browser.
If you’re still having issues after clearing the DNS cache with chrome://net-internals/#dns, you might want to consider cleaning out the socket pools as well. Socket pools are like the multitaskers of the network world, handling several network requests simultaneously. Giving them a good clean could be just the ticket to resolving any lingering issues.
Step 3: Click on “Sockets” from the top left menu or simply go to chrome://net-internals/#sockets
Step 4: Click on “Flush socket pools.”
And there you have it! Just like that, you’re done. Don’t sweat it if you don’t see a confirmation message—that’s totally normal. No step five is needed here. You’re all set to get back to surfing your favorite websites.
If you’re still running into issues after using the chrome://net-internals/#dns fix, don’t worry. There are other effective methods to tackle those pesky DNS cache errors. Here they are:
Fix 1: Use a Third-Party Tool or Extension
BetterBugs is a free Chrome extension that makes clearing or flushing your DNS cache a breeze. You can clear the cache for a specific domain, wipe out cookies, and clean up local and session data. It’s a great alternative to chrome://net-internals/#dns. Here’s how you can use BetterBugs to clear or flush your DNS cache:
3. Select the “Clear Cache” option and hit “Clear.”
Fix 2: Disable Chrome Flags
Chrome flags let you test new or experimental features in Chrome.
But sometimes, these may cause DNS cache errors too. No worries though, you can head over to the Chrome flags tab and hit reset if just using chrome://net-internals/#dns doesn’t work. This is another way to clear the DNS cache. Here’s the lowdown on how to do it.
3. Again, go to chrome://net-internals/#dns and hit the “Clear host cache”.
Try visiting the pages you were facing issues with. These steps should resolve your DNS cache issues if just using chrome://net-internals/#dns doesn’t solve your problem.
If you want to clear the DNS cache on your local system, you can use the following steps depending on your operating system:
For Windows
Clear or Flush out DNS cache on MS Windows 7/8/10/11:
And, you are done. You have just flushed out the DNS cache for your Windows machine.
Verify DNS cache is Flushed on MS Windows 7/8/10/11:
Here’s how you can verify that the DNS cache is flushed on Windows:
You should see a list of DNS entries that are stored in your cache. If the list is empty or shorter than before, i.e. after flushing the DNS, it means the cache has been flushed successfully.
For MacOS
Clear or Flush out DNS cache on MacOS (Catalina or later):
There you are. It should clear the DNS cache on your Mac.
Verify DNS cache is Flushed on MacOS:
Similarly, verify the successful flushing of the cache by checking the list of DNS entries. It should be empty or shorter than the previous list of cached DNS.
Read More: How to Screen Record Mac for Bug Reporting
For Linux
Clear or Flush out DNS cache on Linux:
There you have it. The DNS cache has been flushed.
Verify DNS cache is Flushed on Linux:
Depending on your distribution and DNS service, the command to verify the DNS cache status may vary. You can check and verify if the cache has been cleared or not, based on the DNS service.
Note: The default port on Linux for DNS is 53. It displays the DNS service or process that your Linux system is running. Example: systemd-resolved, nscd, dnsmasq, bind.
Here’s how to check the local DNS service for your Linux.
You will see the DNS service or process that your Linux is running on port 53. It may be systemd-resolved, or any other.
4. Type and run: sudo systemctl status systemd-resolved (Note: This is the command for systemd-resolved DNS service. You can change the DNS service name by replacing the systemd-resolved with your Linux DNS service.)
You will get a confirmation message “Flushed all caches” in the terminal.
Nishil is a successful serial entrepreneur. He has more than a decade of experience in the software industry. He advocates for a culture of excellence in every software product.
Meet the Author: Nishil Patel, CEO, and Co-founder of BetterBugs. With a passion for innovation and a mission to improve software quality.
We never spam.
Share your experience with the founderhere!