Flush DNS Cache: DNS caching always creates a problem whenever anyone sets up a new blog or accesses any site. DNS Caching is a collection of IP addresses and other DNS results like the recently viewed web addresses, stored on the local machine.
Sometimes some bad results also get cached and your domain name or IP does not resolve, due to a bad DNS cache, you start receiving “Page Not Found“/”Page Can’t Be Displayed” or “404 Error Page” messages whenever you try to access any particular site.
How to Flush DNS Cache in Windows, Linux & Mac OS
Whenever you continuously receive “Page Not Found“/”Page Can’t Be Displayed” or “404 Error Page” then you must try to flush the DNS cache on your computer. It will resolve your problem. The following are the steps to clear the DNS cache in Windows 10. Linux and Mac OS.
How to Flush DNS Cache in Windows 10
It is very easy to flush DNS cache in Windows 10. Just follow the below steps and you are done.
- Go to Run (Press Windows key + R ) or Search CMD or Command Prompt on Windows 10
- Type ipconfig /flushdns command in command prompt and press enter
- After pressing enter you will see a message that “successfully flushed the DNS Resolver Cache“.
How to Flush DNS Cache in Linux
Many of the Linux distributors used NSCD (Name Service Caching Daemon) DNS caching application. If you have NSCD you can use the following commands to flush DNS cache in Linux.
To clear DNS cache for a user:
- nscd -i hosts
To clear DNS cache for all users:
- nscd -I hosts
In some Ubuntu and Debian Linux, you can use the following command to flush DNS.
- sudo service dns-clean restart
How to Flush DNS Cache in Mac OS
Apple Mac OS has a different command for every new version of OS. Identify your OS version and use the following commands to flush the DNS cache.
Note: Open terminal to run command.
Mac OS Big Sur: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Mac OS Sierra OS: sudo killall -HUP mDNSResponder
Mac OS El Capitan: sudo killall -HUP mDNSResponder
Mac OS Yosemite: sudo discoveryutil udnsflushcaches
Mac OS Mavericks: sudo killall -HUP mDNSResponder
Mac OS Mountain Lion: sudo killall -HUP mDNSResponder
Mac OS Lion: sudo killall -HUP mDNSResponder
Mac OS Snow Leopard: sudo dscacheutil -flushcache
Mac OS Leopard: sudo lookupd -flushcache
Mac OS Tiger: lookupd -flushcache
How to Clear Chrome Host Cache
If you are using a Chrome web browser you can go to (chrome://net-internals/#dns) and clear the host cache.
Note: One thing you must keep in mind is that if you want to flush the DNS cache, you must run the command prompt/terminal as an administrator.
If you don’t do that probably; you would not be able to clear the cache. A user could be set up with limited privileges on your system. A user must need administrative power to perform this action.