November 25, 2019
2min Read
Domantas G.
If you’re having connection issues, you might want to clear your DNS cache. In this article, you’ll learn the benefits of it and how to flush DNS cache on popular operating systems.
Similar to web browsers, operating systems also store cache files called Domain Name System (DNS) cache. The cache files contain information about all visited websites — hostnames, IP addresses, and resources records.
Most operating systems perform DNS caching to lessen DNS servers’ burden during high traffic. The caches’ validity period is determined by Time To Live (TTL). As long as the cache files are still valid, they will answer content requests without having to go through the DNS server.
Despite so, using corrupt or outdated DNS cache files can lead to error and security vulnerabilities. Therefore, we recommend you to flush DNS cache periodically.
Here are the reasons why you should clear DNS cache regularly:
Depending on your operating system, the steps to flushing DNS cache may vary. The tutorial below will show you how to do it in Windows, Linux, and Mac OS X.
The following tutorial is applicable for Windows XP, 7, Vista, 8, 8.1, and 10.
ipconfig /flushdns
By default, Ubuntu doesn’t cache DNS records. If you manually install a DNS service like name service caching daemon (nscd), the steps below will show you how to flush DNS cache.
sudo /etc/init.d/nscd restart
sudo killall -HUP mDNSResponder
sudo discoveryutil udnsflushcaches
sudo dscacheutil -flushcache
sudo lookupd -flushcache
When experiencing connection issues or seeing incorrectly displayed web pages, your system might be storing corrupt or outdated DNS cache records. You can quickly solve it by flushing the DNS cache. If the problem isn’t resolved, you can check this tutorial on how to clear your browser cache instead.
May 13 2018
To check DNS and IP addresses accessed by Chrome, you can go to: chrome://net-internals/#dns
Gediminas B.
Replied on May 23 2018
Hello, Cesar I appreciate your input. I was not aware of the provided tool and it seems really useful!