How to Flush DNS Cache on Mac

Dns DDOS Attack
Quick Fix

Download and try Outbyte MacAries right now to see what it can do for your Mac.

Developed for macOS

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy Policy.

Anyone who uses the internet leaves some kind of digital footprint. Cookies and Javascript are often used to monitor the behavior of website visitors.

But did you know that your operating system also stores information about your surfing activities? This is done via DNS cache, which you should clean up regularly to prevent problems.

This article will explain what DNS cache is, why your computer saves it, and how to flush DNS cache on Mac.

What Is the DNS Cache?

DNS servers convert domain names, like, into numerical web addresses that computer systems can process. By default, browsers contact the DNS servers whenever a web address is being accessed. The more visitors a URL has, the more work for the DNS server, which could lead to DNS errors, such as “DNS Server Not Responding.”

Pro Tip: Scan your Mac for performance issues, junk files, harmful apps, and security threats
that can cause system issues or slow performance.

Free Scan for Mac Issues
macOS compatible

Special offer. About Outbyte, uninstall instructions, EULA, Privacy Policy.

To minimize work for the DNS server and to prevent frequent fetching whenever the user is trying to access the same website, operating systems, such as Windows and macOS, include their own cache for every resolved address. This is called the DNS cache. Basically, the DNS cache stores all the relevant information required for name resolution. This way, your browser doesn’t have to access the DNS server every time a query is made.

Every DNS Cache contains the following information:

  • Resource data or rdata – This data describes the record, such as the address or host name.
  • Record type – This refers to the type of the created entry
  • Record name – This records the domain name of the object for which the entry was made.
  • Time to live – This pertains to the validity period of the resource record, usually stored in seconds.
  • Class – This refers to the protocol group that the resource belongs to.
  • Resource data length – This is the value for the length of the resource data.

Why You Need to Clear DNS Cache in Catalina

What are the reasons for a regular DNS flush? As discussed earlier, flushing the DNS cache regularly has its purpose. But this process is not automatic. The entries are stored in the cache unless the defined TTL expires. The user needs to initiate the flush, and there are several reasons why you need to do so.

Hide search activities

Although the monitoring of user behavior is mainly carried out through the use of cookies, JavaScript, and other software, the DNS cache still contains relatively important information, which is a potential target for data collectors. Based on the listed addresses, plus additional information saved on the cache, anyone can analyze your page history. The list of web addresses stored on the cache betrays which websites you visit more often. The more comprehensive your cached addresses collection is, the more it reveals about you and your activities.

Security purposes

This is probably one of the most important reasons why you should clear the DNS cache on a regular basis. The data saved in the cache is useful for quickly delivering web pages, but it can be extremely dangerous in the wrong hands. If hackers gain access to your DNS cache, they can easily manipulate the entries and alter your activities. For example, they can redirect you to the wrong websites or show different search results. This is also called DNS poisoning or DNS spoofing. This trickery is generally used to steal login information for online banking and other accounts. By flushing your DNS, cybercriminals won’t have the opportunity to steal your logins.

Resolve technical issues

When you’re having problems accessing specific websites or using web applications, flushing the DNS cache is one of the required troubleshooting steps. For instance, it is possible that the outdated version of the called website is shown due to outdated entries. This happens when the domain name stored in the cache has an incorrect or old IP address. This can easily be fixed by clearing the DNS cache. When you do this, the request will once again be routed to the appropriate DNS server, and not from the cache. This will update the address information in the process and the connection to the webpage will be restored.

How to Flush DNS Cache in Catalina and Big Sur

Now that we’ve established the importance of clearing the DNS cache, let us now discuss the steps on how to Flush DNS Cache in Catalina and Big Sur.

If you’re running an older version of macOS, the process is slightly different so this will not work. You need to be running at least Catalina for the steps to be effective.

Follow the steps here:

  1. Open the Terminal by going to Finder > Go > Utilities. You can also search for Terminal using Spotlight.
  2. In the Terminal window, type in the following command:
    • sudo dscacheutil -flushcache
    • sudo killall -HUP mDNSResponder
  3. Hit Enter to execute the command.
  4. Enter your admin password when prompted.
  5. Close the Terminal.

When you’ve completed the steps above, then you’ve successfully cleared your DNS cache. If you encounter reset and flush DNS cache DNS issues, here are the things you can do:

  • Restart your Mac and try clearing the cache after the reboot.
  • Turn off your firewall and security software temporarily.
  • Clean up junk files from your Mac using Mac repair app.
  • Boot into Safe Mode and try clearing the DNS cache from there.

How to Flush DNS Cache on Mac with Older macOS

The steps above work only for macOS Catalina and Big Sur. If you’re running an older macOS, you need to refer to the appropriate commands below. You will still be using the Terminal to enter the commands, just that the command lines are slightly different.

Sierra and High Sierra:

  • sudo killall -HUP mDNSResponder

Yosemite (OS X 10.10.4) and El Capitan:

  • sudo dscacheutil -flushcache
  • sudo killall -HUP mDNSResponder

Yosemite (OS X 10.10.1 to 10.10.3):

  • sudo discoveryutil mdnsflushcache
  • sudo discoveryutil udnsflushcaches


  • sudo dscacheutil -flushcache
  • sudo killall -HUP mDNSResponder


When you clear the DNS cache using the commands above, take note that you will not get any affirmation or any message that indicates that the process was successful. The only way you’ll know that the DNS cache has been reset is when you are finally able to access the webpage you had trouble with earlier.

Give us some love and rate our post!
[Total: 0 Average: 0]
Notify of
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
Featured Stories
How to Keep Your Mac Cool: Monitoring Mac CPU Temperatures
Mac Stuck on Login Screen: Comprehensive Troubleshooting Guide
Updating from Monterey to Ventura — Update or Clean Install?
macOS Terminal Guide: Basic to Advanced
How to Change your Language & Region in macOS
macOS 14 Beta 1: New Features and User Experiences
The Dark Side on Your Mac: How to Switch to Dark Mode