As a Mac user, there are many steps that you can take which will improve your system performance and security.

One of these is flushing the DNS cache on your Mac. Resetting the MacOS DNS cache is a good idea for any user, as it leads to correct IP address resolution and can recover corrupted DNS cache.

Now you may be confused about what DNS is. Even if you know what DNS is, you may not know how to flush the DNS cache.

Whatever the case is, there’s no need to worry. DNS is not even as complicated as it appears, and you will see that shortly.

This article will show you how to clear the DNS cache on your Mac for both macOS Mojave and Catalina. But first, it would help to know what DNS is.

What Is DNS and DNS Cache?

The Domain Name System, or DNS, is a directory that functions like a phonebook for your Mac. Instead of storing phone numbers, however, the DNS stores internet addresses.

Your Mac’s web browser communicates through an IP address, which is translated from domain names. This information is stored on a DNS server over the internet. On the other hand, DNS cache is temporarily stored on your system’s memory rather than on a server.

Just as you may run into issues looking up a name in a phone book, your Mac may not be able to get the correct domain names if the DNS is cached or corrupted.

Why Should I Reset DNS Cache On Mac?

When a DNS cache corrupts, your web activity is no longer secure. You might enter a website with a false domain name or enter sensitive information during a search over a fake web page.

The DNS cache can become corrupted for multiple reasons, such as malware or network breaches. Whatever the reason may be, you’ll want to clear the DNS cache on macOS to refresh domain names and internet addresses to avoid security-related issues.

Your Mac will receive updated data from the DNS server for its following lookup requests by resetting the DNS cache. Obtaining the correct lookup information from the DNS server keeps your internet browsing secure each time you enter a website.

Even if you don’t have malware, a domain name may not resolve to the correct IP address if your DNS has been cached. To resolve such issues, you need to clear any cached DNS before using the internet on your system again.

How Do You Refresh DNS On Mac?

Flushing your Mac’s DNS cache may seem tricky, but it doesn’t have to be. You don’t even an external app for it. As you will see, there is an easy way to flush your Mac’s DNS and reset DNS settings without using any third-party app.

To reset DNS, you need to determine what your MacOS version is. The steps you need to follow for older macOS versions are slightly different from newer macOS versions, as you will see now.

Keep on reading to find out how to reset the DNS cache according to your Mac OS version.

How Do I Clear DNS Cache on macOS Mojave?

macOS Mojave is version 10.14.0 of Mac OS and includes later patches from Apple.

If you’re using Mojave, you need to take the following steps to reset the DNS cache:

Step # 1

Launch Terminal on your Mac whichever way you prefer. You can press Command + Space or go to Applications > Utilities and search for Terminal to launch it.

Step # 2

Type the following command on Terminal and press the Return key:

 sudo killall -HUP mDNSResponder

Step # 3

You will be prompted to enter the admin password; Type in your password and hit the Return key.

You’re done! Although you will not receive a notification, the command in the second step should clear the MacOS DNS cache in Mojave.

How Do I Flush DNS Cache On MacOS Catalina?

Catalina refers to version 10.15.0 of Mac OS, as well as later releases from Apple.

As a Catalina user, the steps you need to follow to clear DNS cache are similar to macOS Mojave:

Step # 1

Launch Terminal on your Mac. Again, you can either press Command + Space or go to Applications > Utilities to launch the terminal.

Step # 2

Enter the following terminal command to flush your Mac’s DNS cache:

 sudo killall -HUP mDNSResponder -sleep 2

The -sleep two commands is a 2-second delay between the time you hit return and before entering the admin password in the next step. It’s an optional step; you can use a different time delay or omit it entirely if you like.

Step # 3

Type in the admin password and hit Return.

Once the flushing concludes, you can use the web and get on any secure website safely.

How Do I Force Flush DNS Cache?

The command listed in the steps above flushing DNS cache is the same command needed to force flush DNS cache.

In other words, sudo killall -HUP mDNSResponder will forcibly flush your Mac’s DNS cache and reset DNS settings.

If you’ve already executed this command, your Mac will get the correct domain names from the server and translate the IP address for the website you’re trying to visit.

What About Other MacOS Versions?

For earlier versions of macOS, the commands you need to enter in the terminal are listed below:

macOS Sierra (version 10.12.0):

sudo killall -HUP mDNSResponder

macOS El Capitan (version 10.11.0):

sudo dscacheutil -flushcache   sudo killall -HUP mDNSResponder

macOS Snow Leopard (version 10.6.0):

sudo dscacheutil -flushcache

For a more comprehensive list of commands to use with earlier macOS versions, head over to this website.

Final Thoughts

There are several reasons why you’ll want to flush your Mac’s DNS cache and reset its DNS settings.

No matter what the case is, you do not need the help of an external app to flush the DNS cache of a Mac. It can be done using just the terminal, no matter what your MacOS version is.

Just follow the steps in this article, and you’ll be browsing securely again in no time! If you like this content or have a Mac-related issue you need help with, leave a reply on our website.