How to Flush DNS on Mac: A General Guide

Welcome to this article where we will be discussing a very important topic for Mac users, “How to Flush DNS on Mac”. DNS or Domain Name System plays a crucial role in accessing the internet. It translates domain names into IP addresses to help establish a connection between your device and the website you want to visit. However, sometimes DNS cache can become corrupted or outdated, resulting in various connectivity issues. We will guide you through 12 simple steps to flush DNS on your Mac and tackle any issues related to it.

Steps to Flush DNS on Mac

Step 1: Open Terminal

The first step is to open the Terminal application on your Mac. You can do this by navigating to Applications > Utilities > Terminal or by using Spotlight Search to directly search for Terminal.

Step 2: Enter Command

Once Terminal is open, you need to enter the following command. It will help you get the current DNS cache stored on your Mac.

dscacheutil -cachedump -entries > /tmp/111mDNSResponder

Step 3: Enter Password

After entering the command, you will be prompted to enter your Mac password. Type in your password and hit enter.

Step 4: Display Contents of DNS Cache

Now, enter the following command to display the contents of your DNS cache.

cat /tmp/111mDNSResponder

Step 5: Clear DNS Cache

Next, enter the command to clear the DNS cache on your Mac.

sudo killall -HUP mDNSResponder

Step 6: Flush Cache on Older Mac Versions

If you are using an older version of Mac, the above command might not work. Therefore, enter the following command.

sudo dscacheutil -flushcache  sudo killall -HUP mDNSResponder

Step 7: Confirm Cache is Cleared

To check if the cache has been cleared, you need to enter the following command.

sudo dscacheutil -cachedump -entries > /tmp/222mDNSResponder

Step 8: Display Cache Contents Again

Now, enter the command to display the contents of your DNS cache again.

cat /tmp/222mDNSResponder

Step 9: Restart DNS Client

Enter the command to restart the DNS client on your Mac.

sudo discoveryutil udnsflushcaches

Step 10: Clearing Browser Cache

Sometimes, the issue is with your browser cache. To clear it, launch your browser and navigate to its settings. Find the option to clear browsing data, select it and confirm your choice.

Step 11: Restart Modem and Router

Restart your modem and router. This will help in resolving any connectivity issues and also help in updating your DNS cache.

Step 12: Restart Your Mac

As a last resort, restart your Mac to ensure that all changes are applied and your DNS cache is refreshed.


Now that we have gone through the steps to flush DNS on Mac, let’s understand them in more detail. Terminal is a command-line interface where you can execute commands to perform various tasks. In the first step, we opened Terminal to execute commands.

In step 2, we entered a command to get the current DNS cache stored on our Mac. This helped us to confirm whether the cache was really causing the issue.

After entering the command, we were prompted to enter the password in step 3 as some Terminal commands require administrative privileges.

In step 4, we used a command to display the contents of our DNS cache. This was helpful to diagnose any issues related to the cache.

Next, we cleared the DNS cache on our Mac by entering the appropriate command in step 5. On older versions of Mac, the command to clear the cache is different, as mentioned in step 6.

Step 7 helped us confirm whether the cache has been cleared successfully. We once again used the command to display the cache contents in step 8.

In step 9, we restarted the DNS client to ensure that all changes are applied and the cache is refreshed.

Step 10 was optional, but sometimes clearing the browser cache also helps in resolving connectivity issues.

In step 11, we restarted our modem and router to make sure there are no issues with the network.

Finally, in step 12, we restarted our Mac to complete the process.

Tips and Tricks

1. Use Command + Spacebar Shortcut

Instead of using Spotlight Search, you can use the Command + Spacebar shortcut to open the search bar and directly search for Terminal.

2. Check Router Settings

Make sure your router settings are configured correctly and there are no issues with them that might be causing connectivity issues.

3. Use Wi-Fi Diagnostics Tool

Your Mac comes with a built-in Wi-Fi Diagnostics tool that lets you diagnose various Wi-Fi related issues.

4. Update macOS

Make sure you are running the latest version of macOS. It helps in resolving various connectivity issues and bugs.

5. Use Third-Party DNS Servers

Sometimes, using third-party DNS servers like Google DNS or OpenDNS can help in resolving connectivity issues.

6. Check Firewall Settings

Check your Firewall settings to ensure that the needed ports are open and there are no restrictions imposed on your internet connection.

7. Disable VPN

If you are using a VPN, disable it temporarily to see if it is causing any issues with connectivity.

8. Check Ethernet Connection

If you are using an Ethernet connection, make sure that the cable is securely connected and there are no issues with the cable itself.

9. Reset SMC and NVRAM

Resetting SMC (System Management Controller) and NVRAM (Non-Volatile Random Access Memory) can help in resolving various connectivity issues.

10. Contact Support

If none of the above tips work, contact Mac support or your internet service provider for further assistance.

We hope this guide helped you in successfully flushing DNS on your Mac. Remember to follow the steps carefully and use the tips and tricks mentioned for a smooth browsing experience.

Advantages and Disadvantages of Flushing DNS on Mac

Flushing DNS on a Mac is a useful troubleshooting technique when facing network connectivity problems. This process flushes the DNS cache on your computer, effectively clearing out any outdated information and allowing for updated DNS information to be retrieved. However, like any other process, there are advantages and disadvantages to flushing DNS on a Mac.

Advantages of Flushing DNS on Mac

  1. Improved Network Connectivity: If you’re having connectivity issues, flushing DNS can help resolve the problem and create a stronger connection.
  2. Fixing DNS Errors: Flushing DNS can help fix DNS errors related to accessing websites and apps, providing a smoother user experience.
  3. Efficient Troubleshooting: Flushing DNS is a quick and easy troubleshooting technique that can save time and hassle.
  4. Cleaning up Cache: Flushing DNS helps clean up your computer’s DNS cache, improving its overall performance.
  5. Preventing Cyber Attacks: Flushing DNS can help prevent cyber attacks, as it removes any cached domain information that may have been compromised.
  6. Refreshing DNS: Flushing DNS updates the DNS information on your computer, making it more accurate and up-to-date.
  7. Easy to Do: Flushing DNS is an easy process that can be done by anyone, regardless of technical expertise.
  8. Free of Cost: Flushing DNS on a Mac is entirely free and doesn’t require any additional equipment or software.
  9. Ensures Privacy: Flushing DNS helps protect your privacy by removing any stored DNS information that may contain personal details.
  10. Fixing Cached Data: Flushing DNS can fix caching issues and ensure that your data is accurate and up-to-date.

Disadvantages of Flushing DNS on Mac

  1. Potential Loss of Speed: When you flush DNS, it may take a few seconds to retrieve all the new information, potentially slowing down your computer temporarily.
  2. Loss of Custom DNS Settings: Flushing DNS removes all custom DNS settings you may have made before the flush, so you may need to set them again.
  3. Loss of Session Data: Flushing DNS can cause the loss of session data for any open applications, so it’s best to save your work and close all applications before flushing DNS.
  4. May Affect Network Configurations: Flushing DNS can sometimes affect network configurations and lead to more connectivity problems, in rare cases.
  5. No Permanent Solution: Although flushing DNS can solve many connectivity issues, it is not a permanent solution and may require to be repeated in the future.
  6. Potential Compatibility Issues: Flushing DNS may create compatibility issues with some software or applications that rely on cached DNS information.
  7. Risk of Data Breach: Flushing the DNS cache exposes your browsing history and DNS-related activities to potential data breaches.
  8. Advanced Level Process: Although flushing DNS is a relatively easy process, it may require more technical knowledge for troubleshooting deeper network problems.
  9. Possible Disruptions to Services: Flushing DNS can disrupt certain services such as VPN or remote access connections, so it’s important to consult with your IT department before doing so.
  10. May Not Solve All Network Problems: Flushing DNS may not solve all the network-related problems you’re experiencing, and other troubleshooting techniques may be required.

As you can see, there are both advantages and disadvantages to flushing DNS on a Mac. While this process can help solve many network connectivity problems, it may also lead to some issues. Always weigh the pros and cons before deciding to flush DNS on your Mac and consult with an IT professional when unsure.


1. What is DNS?

DNS stands for Domain Name System, it is a process that allows you to access websites with their domain names whereas computers interpret websites as a series of numbers called IP addresses.

2. Why do I need to flush DNS on my Mac?

If you are experiencing internet connectivity issues, flushing the DNS on your Mac can help resolve the problem by clearing the DNS cache and allowing your computer to fetch the latest DNS information.

3. Will flushing DNS on my Mac delete any important files?

No, flushing DNS on your Mac will only clear cached DNS information and will not delete any important files.

4. How do I open Terminal on my Mac?

You can open Terminal on your Mac by going to Applications > Utilities > Terminal.

5. What command do I need to flush DNS on my Mac?

You need to run the command “sudo dscacheutil -flushcache” in Terminal to flush DNS on your Mac.

6. Do I need admin privileges to flush DNS on my Mac?

Yes, you need to be logged in as an administrator or have admin privileges to run the command to flush DNS on your Mac.

7. Will flushing DNS on my Mac affect my browsing history?

No, flushing DNS on your Mac will not affect your browsing history.

8. Can flushing DNS on my Mac improve my internet speed?

Flushing DNS on your Mac can help improve internet speed by reducing the time it takes to communicate with DNS servers and fetching the latest DNS information.

9. How often should I flush DNS on my Mac?

There is no fixed frequency for flushing DNS on your Mac, but it is recommended to do it when you experience internet connectivity issues.

10. Will flushing DNS on my Mac affect other devices on the same network?

No, flushing DNS on your Mac will only affect your computer and not other devices on the same network.

11. Can I flush DNS on my Mac using a third-party application?

Yes, there are several third-party applications that allow you to flush DNS on your Mac, but using Terminal is the recommended method for better control and security.

12. Can I undo flushing DNS on my Mac?

No, once you flush DNS on your Mac, you cannot undo it. However, your computer will automatically rebuild the DNS cache when you visit websites.

13. Should I restart my Mac after flushing DNS?

No, you do not need to restart your Mac after flushing DNS. However, it is recommended to restart your browser for the changes to take effect.

Flushing DNS cache on a Mac is necessary to be done when you encounter network issues. It removes the outdated DNS information and re-establishes fresh connections with DNS servers. This article will give you a brief about DNS, how to flush DNS on mac and its significance.

How to flush DNS on Mac?

There are two ways to flush DNS on Mac; one is using Terminal, and the other is from System Preferences. Let’s get into the details of both the methods.

Method 1: Flushing DNS through Terminal Command

Step 1: Open the Terminal application from the Launchpad or Spotlight.

Step 2: Type the following command in the Terminal window:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Step 3: Enter your Mac username and password when prompted and hit the Enter button.

Step 4: Close the Terminal window. Now, the DNS cache on the Mac has been cleared successfully.

Method 2: Flushing DNS through System Preferences

Step 1: Click on the Apple icon in the upper left corner of the screen and select System Preferences.

Step 2: Click Network in the System Preferences window.

Step 3: Choose the type of connection (Ethernet or Wi-Fi) from the left-hand pane.

Step 4: Click on the Advanced button in the lower right corner of the window.

Step 5: Click on the DNS tab.

Step 6: Click on the “-” (minus) icon to remove the existing DNS servers.

Step 7: Click on the “+” (plus) icon to add a new DNS server and enter the new server address.

Step 8: Click OK and Apply to save the changes.

Now the DNS cache on your Mac has been successfully cleared!


In conclusion, DNS plays an essential role in connecting to the web efficiently. Flushing DNS cache on Mac is quite easy and can be done through terminal or System Preferences. Clearing the DNS cache can help fix network problems and improve the speed of your internet connection. Therefore, make sure to clear the DNS cache periodically to have a better browsing experience.


We hope this article helps you to clear DNS cache on your Mac effectively. If you still have any queries or doubts, please feel free to ask us in the comment section below. Keep browsing!