How To Flush DNS Cache On Mac: Easy Steps

Clearing your DNS cache is a quick and straightforward solution to resolve DNS and internet connectivity issues while securing your local cache.

I’ll explain what flush DNS cache on mac how it works, and why you should flush it in this article.

For Microsoft Windows and various versions of Macs, you’ll also discover how to delete your local DNS cache. It is true if you are using a laptop at home or work.

flush dns cache on mac

Almost all the time, your Mac’s DNS cache isn’t a problem. It operates silently in the corner, directing you to the appropriate websites when you request them.

However, you may experience difficulties loading sites if it becomes distorted, with 404 errors becoming widespread. One option is to clean the area, and others are mentioned below.

What is a DNS cache?

A DNS lookup starts when you type a URL into your internet web browser. Customer (your device) queries can be addressed by your web browser or the recursion responder if the data sought is in the cache.

However, this frequently includes multiple separate servers (recursive, root, top-level domain (TLD), and authorized nameservers).

What is DNS cache?

A DNS (Domain Name System) cache is similar to a website’s memory block. Any frequently accessed website is cached till the domain’s DNS records’ time to live (TTL) has expired.

When a record’s TTL expires, modifications must be propagated worldwide across all nodes, and you must restart the lookup process.

Why should you flush DNS cache on MAC periodically?

The DNS cache might become obsolete or damaged over time, causing connectivity issues. Malware can also influence it, forcing your browser to redirect you to harmful websites or phishing scams.

Flushing Mac’s DNS cache can resolve these issues. If your google chrome web browser does start diverting to fraudulent websites, you should conduct a virus scan on your Laptop.

There is a multitude of causes to clear your DNS cache regularly. The most typical uses are to keep your local cache updated, resolve DNS issues when attempting to access certain websites, and guard against DNS resolver cache toxicity and phishing.

DNS Cache Poisoning

Flushing your DNS cache is crucial for security reasons. Several end users are unaware that hackers can acquire DNS caches.

It is a significant security risk since fraudsters can alter IP addresses or even add new ones if they gain entry to the cache. 

Users are sent to a bogus site designed to collect sensitive information when this occurs. It is referred to as DNS cache poisoning, a type of spoofing.

When you clear your cache and attempt to enter a website, resolvers must obtain an authoritative response to your request that can help thwart assaults like this.

DNS Record Propagation

DNS (Domain Name System) record modifications take time to spread across all servers worldwide—up to 24-48 hours.

In some situations, the cache can be out of the current. It may cause some websites or applications to function incorrectly.

It could also cause sites to appear erroneously and display outdated graphics and information. Cleaning the cache in your web browser can assist, but it’s not always sufficient.

DNS Servers Not Responding Errors

Frequent connectivity difficulties like “DNS server not responding” can be helped by flushing your DNS cache.

If a supplier or site isn’t having problems with outages or DNS, the issue is likely on the client’s end. This problem is frequently resolved by deleting the DNS cache.

Ways to flush DNS cache (depending on your operating system)

Based on the version of OS X and macOS you’re using, there are a few alternative procedures to cleanse the DNS cache.

The technique is the same across every version of macOS.

To flush your DNS cache on macOS Monterey and macOS Big Sur:

  • To find, press Command+Space or utilize the Spotlight search feature.
To find, press Command+Space or utilize the Spotlight search feature.
  • To launch the Terminal app, search Terminal and ctrl-click this under Top Hit.
To launch the Terminal app, search Terminal and ctrl-click this under Top Hit.

Mention: If spotlight Search doesn’t launch the terminal, head over to Go > Utilities > Terminal or choose Applications, launch the utility directory, and next, double-click Terminal.

Choose terminal
  • Start Terminal and type the following command: Sudo killall -HUP mDNSResponder; sudo dscacheutil -flushcache
Start Terminal and type the following
  • To wipe the DNS cache, input your mac’s password and afterward click Return.
To wipe the DNS cache, input your mac's password and afterward click Return.

Flush DNS on macOS Mojave (version 10.14)

Just use the Terminal app on macOS Mojave to remove the DNS cache:

  • With your favorite technique, launch the terminal. app. You can open the terminal by going to Applications -> Utilities or pressing Command + Space to open Spotlight and searching for it.
  • Press Enter on your keypad after typing sudo killall -HUP mDNSResponder.
  • Return after entering the administrator username and password for the user in the issue.

Whenever the process is complete, there is no indication. You can alter this by appending another command.

View Current DNS Cache (Windows)

Before deleting your DNS cache, you could run the following command to examine what’s already in it:

Command Prompt

Check your DNS cache in Windows Prompt by following the instructions below:

  • Launch CMD and enter “ipconfig /displaydns” (without quotation marks) into the command prompt.
Launch CMD and enter "ipconfig /displaydns"
  • To finish, hit enter.

It will show you the contents of your DNS cache in a long list.


Follow these steps to see your cache in PowerShell:

  • Open PowerShell.
  • In the command prompt, type “Get-DnsClientCache” (no quotes).
In the command prompt, type "Get-DnsClientCache" (no quotes).
  • To finish, hit enter.

Clear DNS Cache with Command Prompt

It’s easy to clear your DNS cache. Type the following in the command prompt:

  • Launch CMD and type “ipconfig/flushdns” (without quotation marks) into the command prompt.
  • To finish, press Enter.

The text under should now appear:

Launch CMD and type "ipconfig/flushdns"

On the client end, it will erase the DNS cache (local cache).

Clear DNS Cache with PowerShell

You’ll need to run this cmdlet if you’re using Windows PowerShell:

  • Launch PowerShell.
  • In the command prompt, but “Clear-DnsClientCache” (no quotes).
  • To finish, hit Enter.
In the command prompt, put "Clear-DnsClientCache"

How to clear the DNS in older macOS versions

Various commands are used in previous Mac OS versions. Type these commands in the terminal to clear the DNS cache on past editions:

  • Execute sudo killall -HUP mDNSResponder in macOS El Capitan or later.
  • Sudo discoveryutil udnsflushcaches is the command for macOS Yosemite.
  • The operation is sudo killall -HUP mDNSResponder in Lion, Mountain Lion, and Mavericks.
  • Sudo dscacheutil –flushcache in Mac OS Snow Leopard
  • sudo lookupd –flushcache on Mac OS Leopard
  • Use lookupd –flushcache with Mac OS Tiger as well.
  • Test the affected website after flushing the DNS cache on your Macbook to see whether the issue has been resolved, and you can visit it properly once more.

How to clear DNS cache: The manual way

Before we begin, keep in mind that flushing the DNS cache will cause active online browsing to be interrupted, so it’s best to close your browser first. You can use the terminal way in mac to flush the DNS cache.

How to clear DNS cache: The easy way

As previously said, you can use an app to erase these old cache files automatically. CleanMyMac is the only app we know of that accomplishes it. It is a very well Mac cleaning program that is also Apple-approved.

Clearing the DNS cache is one of its many capabilities that might assist you with this. All you need to do to wipe the DNS cache with CleanMyMac is install it, which you could do for free here.

Another option is to clean the cache in your browser (not the same as clearing the DNS list). If you launch CleanMyMac X, it will perform it for you regularly for all browsers.

In theory, this should:

  • Resolve minor difficulties with access
  • Make some room
  1. Launch CleanMyMac X.
Launch CleanMyMac X.
  1. In the sidebar, select the System Junk option.
  2. Choose Clean after going over the list of objects detected.

Everything is back to normal, so it should be simple.

Final Thoughts

That’s all there is to it. Your local DNS cache has now been successfully cleaned. You may do it as often as you want because it has no harmful effects on your system.

Hopefully, this will fix any issues you’re having and improve the security of your website connections. Even if a related problem persists, you’ve reduced the list of possible reasons.