If you’re facing network connectivity issues, you need to try clearing the DNS cache. This can fix most of the network problems, and it is recommended that you do it at least once a month. The process is pretty simple and won’t take you long.
Key Takeaways
- A DNS cache stores the results of the DNS searches related to websites and servers that you search for.
- Clearing the DNS cache is effective in fixing network connectivity errors and slow loading times on your computer or mobile phone.
- The method of clearing the DNS cache is different for each platform, but you can do it using the Command Prompt on Windows.
What Is DNS Cache?
Domain Name System (DNS) translates the domain names into IP addresses a machine can understand. It is an important part of the internet network that lets you visit websites and servers with easy domain names.
Meanwhile, a DNS cache is a temporary storage area that stores information related to recent DNS searches. So, the next time you search for the same website, your computer will look for the information within the DNS cache rather than making a new request to the DNS Server. Consequently, the time it takes for the website to load is reduced.
Why Should You Clear DNS Cache?
Sometimes, the data stored in the DNS cache can become corrupt or outdated, leading to problems when accessing a website. It can also cause errors on your computer or increase the loading time. Thus, it becomes necessary to clear the DNS cache to resume the proper operation of your device.
How To Clear DNS Cache?
The method for flushing the DNS cache varies with each operating system, like Windows, macOS, and Linux. Also, read our guide on how to power cycle your internet router, as that can help fix connectivity issues as well.
Windows
- Type cmd in the Search Bar and launch the Command Prompt.
Command Prompt – Image Credits [Tech4Gamers] - Write and Execute the command ipconfig/flushdns.
DNS Code – Image Credits [Tech4Gamers] - Wait until the message, Successfully Flushed The DNS Resolver Cache, appears in the window.
MacOS
- Click on the Spotlight icon on the top bar.
Spotlight – Image Credits [Tech4Gamers] - Search for Terminal and Open it.
Terminal – Image Credits [Tech4Gamers] - The command to clear the DNS cache in macOS varies with the version. Type the right command based on your macOS.
OS Version DNS Flush Command Code Tiger lookupd – flushcache Ventura/Monterey/Catalina/Big Sur sudo dscacheutil – flushcache; sudo killall -HUP mDNSResponder Yosemite sudo discoveryutil mdnsflushcache Lion/Mojave/Mountain Lion/Mavericks/Sierra/El Capitan sudo killall -HUP mDNSResponder - Hit the Enter key to launch the command.
- Type your Password and press Enter.
macOS Code – Image Credits [Tech4Gamers]
Linux
- Click on the Menu symbol on the left sidebar.
Menu – Image Credits [Tech4Gamers] - Press Terminal.
Terminal – Image Credits [Tech4Gamers] - First, type and enter resolvectl statistics. It will calculate the size of the DNS cache.
- Next, execute the command resolvectl flush-caches to clear the DNS cache.
- Ensure the process was successful by checking the size of the cache using the same code in Step 3.
Linux Code – Image Credits [Tech4Gamers]
Android
- Tap the Settings icon on the Main Screen.
Settings – Image Credits [Tech4Gamers] - Move to Apps.
Apps – Image Credits [Tech4Gamers] - Find Chrome or any other web browser you use on your phone.
Chrome – Image Credits [Tech4Gamers] - Go to Storage.
Storage – Image Credits [Tech4Gamers] - Press the Clear Cache button on the bottom panel.
Clear Cache – Image Credits [Tech4Gamers] - Next, tap Manage Storage.
Manage Storage – Image Credits [Tech4Gamers] - Hit the button, Clear All Data.
Clear All Data – Image Credits [Tech4Gamers]
iOS
- Head to the Settings.
Settings – Image Credits [Tech4Gamers] - Select General.
General – Image Credits [Tech4Gamers] - Under General Settings, go to iPhone Storage.
iPhone Storage – Image Credits [Tech4Gamers] - Tap on Safari or any other browser.
Safari – Image Credits [Tech4Gamers] - Click on Website Data.
Website Data – Image Credits [Tech4Gamers] - Hit Remove All Website Data.
Remove All Website Data – Image Credits [Tech4Gamers]
When Should You Clear DNS Cache?
Erasing the DNS cache periodically, like once a month, keeps errors and connectivity issues away from your computer and mobile phone. However, it becomes crucial to clear the cache in certain situations, for example, when;
- You cannot access or load certain websites on your device.
- It takes too long for the website to load properly.
- You face network connectivity errors on your device.
- You have updated the DNS settings or the Domain Name for your network.
What Are The Benefits Of Clearing DNS Cache?
The simple process of cleaning the DNS cache comes with a list of benefits for your device. For instance, it solves issues related to accessing websites on your computer/phone by making a new request to the DNS Server. Hence, you can easily launch websites.
In addition, it accelerates browsing speed by cleaning the buildup of unnecessary cache data in the DNS. Therefore, it only leaves the latest information so the device can quickly access it.
Furthermore, it comes in handy when you have recently changed the Domain Name or DNS Configurations on your computer. Flushing the DNS cache ensures the new settings are smoothly applied by removing old data so that your computer uses the most up-to-date information.
Importantly, refreshing the DNS cache is a widely-used troubleshooting step in resolving network connectivity or browsing errors. It makes sure there are no faults within the DNS data, which could be tempering with the network connectivity or smooth browsing on your device.
Final Words
In conclusion, follow the steps mentioned in this guide on how to clear DNS cache on different Operating Systems so you can get back to hassle-free browsing.
Frequently Asked Questions
Clearing the DNS cache removes old and corrupt data in the DNS to allow quick and easy access to websites and network servers.
Launch “Terminal” and execute the code “resolvectl flush-caches” to erase the DNS cache.
Clear the browser’s data from your phone settings to wipe the DNS cache on your mobile.
Also Read:
Thank you! Please share your positive feedback. 🔋
How could we improve this post? Please Help us. 😔
[How To’s & Guides Editor]
Haddi has been in the Gaming and tech Space for over 10 Years Now; he has worked on notable websites like eXputer, Gamepur, Gear Siege, Gearnuke, and plenty more. He is an expert at Games & PC Hardware; you can expect him to solve any problem. People often joke, that if there is any problem anyone can solve, Haddi can solve it faster. Currently, Haddi writes and manages a Team of Experts at Tech4Gamers.
Contact: [email protected]