If you are a macOS user and have recently made changes to your DNS settings, then doing a flush, aka cleaning the DNS cache would be a good idea. But why is it important to clear DNS cache?
Well, simply because when your DNS is cached, nameservers or domain name may not resolve to the correct IP and may lead you to a cached website, or worst, it’ll be unable to establish a connection ans you’ll have to quit the app altogether.
In this post, I will show you how to clear and reset DNS cache on your macOS Catalina (works for Mojave as well).
Let’s check it out.
How to Clear DNS Cache in macOS High Sierra (or Older Versions)
Clearing or resetting DNS caches in your MacOS is a good idea as it speeds up the lookups... Read more
Launch Terminal app. You can do it swiftly by executing this keyboard shortcut Command + Space. Then type in Terminal, then hit Enter.
Copy the following command into Terminal, and hit Return.
sudo killall -HUP mDNSResponder; sleep 2;
Enter your macOS’s password, and hit Return again.
Quit Terminal by using the keyboard shortcut: Command + Q.
That’s it, simple as that. Your DNS cache should now be cleared.
Now, if you are using older versions of macOS, targeting the
mDNSResponder process using the above command may not work.
Reset DNS Cache in older macOS
Check out this post for commands on clearing DNS cache on older versions of macOS.