A DNS (Domain Name System) cache (aka DNS resolver cache) is a temporary database. It consists of the records of recent as well as attempted visits of websites along with internet domains. To troubleshot cache poisoning or other internet connectivity issues, you may need to clear a DNS cache on your Mac. The process of flushing DNS cache in macOS Sierra and macOS High Sierra requires a new command.
When you clear or reset the DNS cache on your Mac, it removes all the entries. Besides, it also gets rid of invalid records. More after the jump:
How to Clear DNS Cache in macOS Sierra or macOS High Sierra
Step #1. First off, you have to open the Terminal app.
Simply search Terminal using Spotlight search or head over to Finder → Applications → Utilities.
Step #2. Now, you need to enter the command syntax given below.
sudo killall -HUP mDNSResponder;say DNS cache has been flushed
Step #3. Now, press the Return/Enter key → Up next, enter the admin password.
Now, you need to wait for a few moments until the DNS cache is completely flushed out.
Once it’s done, a verbal audio alert will confirm that DNS cache is flushed on your Mac.
Just in case the aforementioned command hasn’t worked in resetting DNS cache, use this alternative.
Step #1. Open Terminal and enter the following command.
sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache;say MacOS DNS cache has been cleared
Step #2. Enter System password and press the Enter/Return key.
So, that’s the easy way to clean up DNS cache in macOS Sierra or High Sierra.
If you want to erase DNS cache on your on the older versions of macOS, head over to this post.
You might want to refer these posts as well:
- How to Improve macOS High Sierra Battery Life
- How to Customize Website Settings in Safari on Mac
- How to Enable Two Factor Authentication for Apple ID on Mac
- How to Clear Touch ID Data on MacBook Pro