How to Flush the DNS Cache on a Mac

How to Flush the DNS Cache on a Mac

How can we Flush the Mac DNS Cache?

By learning to flush the Mac DNS cache you can fix lots of issues related to the Internet. Have you found any issues when loading the websites in your Browser? The possible reason can be the DNS cache. This cache can be removed without being a threat to your Mac. This can possibly fix the issues you face when loading websites.

According to the macOS version you use, you have to perform a  particular command in the finishing to leave Mac DNS caches. We will guide you on how to do this on your Mac.

Why do we have to Flush the DNS Cache on a Mac?

Basically, you have to remove the DNS cache when facing the issues related to DNS on your Mac. This contains any kind of DNS error message in the browser. This also affects on the apps on your Mac.

When you clear the DNS cache it is very helpful to fix the issues related to the browser. This is based on the way that the DNS functions on your computer. As you know, DNS translates the domain names to IP addresses. If the DNS cache is altered or there is any other issue, the translation fails which results alter the browsing session.

To fix the issues on the Mac you can use flushing the DNS cache.

How do I Clear the DNS Cache on Mac

In macOS, there you can flush the DNS cache using a command with the finishing. There are differences in this command and you have to use the suitable one for the macOS version.

Step 1. Finding the macOS Version

First, you have to find the macOS version. This is helpful to decide the command to use for the DNS cache clearing. To check the macOS version, click the Apple logo in the top left corner and choose About This Music

There is the macOS name with the version. Write down the version as it will need in the below section to delete the DNS cache.

Step 2. Running a Command to Flush the DNS Cache

Use a terminal window to execute a command and flush the DNS cache on the Mac. Here is the process.

  • Get the Termila by going with Spotlight, Launchpad, or Finder.
  • If the macOS version is 10.11 or later, give the below command in the Terminal and press Enter.

sudo killall -HUP mDNSResponder

  • If the macOS version is 10.10 give the below command and flush the cache.

sudo discoveryutil udnsflushcaches

  • Those who use macOS 10.7, 10.8, and 10.9 use the below command.

sudo killall -HUP mDNSResponder

  • macOS 10.6 owners should run the below command

sudo dscacheutil -flushcache

  • If it is macOS 10.5 or earlier this is command for you to flush

sudo lookupd -flushcache

If you notice a command has got sudo at the start, you, have to enter the admin password before the command runs. You should have the password to try and execute these commands on the Mac.

Are there any issues with Flushing the DNS Cache

When flushing the DNS cache it only deletes the cached entries of it. There will be no issue when removing the DNS cache files.

The next time when you connect the site from the browser, the browser will catch new entries of the DNS server. They will be stored in the DNS and reoccur the process.

Clearing the DNS Cache to Fix Issues on a Mac

This flushing of the DNS is no harm to your Mac so you can do this without any hesitation when an issue takes place next time. This will surely fix lots of errors related to the server domain name on your computer.

Besides DNS the other cache types can be cleared on Mac. It is very easy to clear cache and to troubleshoot any kind of issue.

Read more; How to Clear Cache in Safari for Mac

Leave a Reply