Often times you get errors and cached version of a web page even after you delete your Cache from browser you use. That is not enough because a temporary database in stored into your Mac operating system as a DNS cache.
How to Clear DNS Cache on Mac OS X in 1 Minutes
There is no direct one-click way to delete this cache in the system and you need to use a command to get it done right. These resolved DNS queries are kept as local cache and its a good practice to flush them to clear the DNS clog.
There is a single command that you need to execute using Terminal App and it will flush the cache immediately. This command works on OS X Yosemite and OS X El Capitan in our tests, please comment below if it worked for you on older versions.
Clear Your DNS Cache In Mac OS X
Go to “Terminal” using Spotlight Search, by pressing CMD+Space and use the following command and press enter:
SUDO DISCOVERYUTIL UDNSFLUSHCACHES
After that, you need to delete MDNS cache, you need to paste the following command in Terminal and hit enter:
SUDO DISCOVERYUTIL MDNSFLUSHCACHE
After pasting the above commands, press enter. If it asks for password, enter your system password.
Once the commend has been triggered, restart your Mac and that is it. You have successfully cleared your DNS cache.
If you have any questions, do let us know in the comments below.