Recent comments

Internet Articles

Clearing DNS Cache on Mac: A Step-by-Step Guide


The Domain Name System (DNS) cache on your Mac stores information about previously visited websites, allowing for faster access to those sites in the future. However, there are instances when clearing the DNS cache becomes necessary, such as troubleshooting network issues or resolving DNS-related problems. In this article, we will provide you with a step-by-step guide on how to clear the DNS cache on your Mac, ensuring a smooth browsing experience.

Step 1: Launch Terminal:

To begin, open the Terminal application on your Mac. You can find it by navigating to Applications > Utilities > Terminal. Alternatively, you can use the Spotlight search by pressing Command + Space and typing "Terminal."

Step 2: Enter the Command:

In the Terminal window, you will need to enter a specific command to clear the DNS cache. Type the following command and press Enter:

Copy code

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Note: You may be prompted to enter your admin password. Type your password (you won't see it as you type) and press Enter.

Step 3: Verify DNS Cache Clearing:

Once you've entered the command and provided your admin password, the DNS cache on your Mac will be cleared. You can verify this by observing the Terminal's response, which should indicate a successful flush of the cache.

Step 4: Restart Browsers and Applications:

After clearing the DNS cache, it's a good practice to restart your web browsers and other applications that rely on internet connectivity. This ensures that the changes take effect and that your Mac starts with a fresh DNS cache.

Alternative Method: Using Network Preferences:

If you prefer a graphical interface to clear the DNS cache, you can use the Network Preferences option on your Mac. Follow these steps:

Click on the Apple menu in the top-left corner of the screen and select "System Preferences."

In the System Preferences window, click on "Network."

From the left-hand side panel, select the network connection you are using (Wi-Fi, Ethernet, etc.).

Click on the "Advanced" button in the bottom-right corner.

Navigate to the "DNS" tab.

In the DNS tab, click on the "DNS Servers" list and remove any entries by selecting them and clicking the "-" button.

Click "OK" to save the changes.

Restart your Mac or disable and re-enable your network connection to apply the changes.


Clearing the DNS cache on your Mac can be a helpful step in troubleshooting network-related issues or resolving DNS conflicts. By following the step-by-step guide outlined in this article, you can easily clear the DNS cache using the Terminal or the Network Preferences. Remember to restart your web browsers and applications after clearing the cache to ensure the changes take effect. Regularly clearing the DNS cache can help maintain a smooth browsing experience on your Mac.

No comments