If you’re a Mac user and you’ve noticed certain websites not loading properly, outdated pages showing up, or unusual browsing errors, the issue may not be with your internet connection or browser it could be your DNS cache. Flushing the DNS cache on a Mac is a simple solution that clears outdated or corrupted data, allowing your computer to retrieve the most up-to-date information from websites.
This guide will explain what DNS cache is, why clearing it helps, and exactly how to flush DNS cache on a Mac step by step, no matter which macOS version you’re using.
What Is DNS Cache?
DNS stands for Domain Name System, which acts like the internet’s phonebook. Instead of typing in a long string of numbers (IP addresses) to visit a website, you just enter the domain name (like google.com), and DNS translates it for your computer.
To speed up browsing, your Mac temporarily stores these translations in its DNS cache. However, when the cache becomes outdated or corrupted, you may run into errors such as:
-
Websites failing to load
-
Pages showing old versions of a site
-
Inconsistent or slow internet connections
-
Issues after changing DNS servers
That’s where flushing DNS cache comes in it clears the stored data and forces your Mac to look up the latest information.
When Should You Flush DNS Cache on a Mac?
Knowing when to reset your DNS cache can save time and fix many common problems. Here are the most common scenarios:
-
Websites don’t load or display incorrectly.
-
You recently updated DNS settings but changes aren’t showing.
-
Your browser is showing cached, outdated content.
-
You suspect malicious cache entries (common with phishing redirects).
-
General network slowdowns or unusual connectivity issues.
If any of these sound familiar, it’s time to flush your DNS cache.
How to Flush DNS Cache on a Mac
The process is done through Terminal, Apple’s built-in command-line tool. The exact command depends on your macOS version, but it only takes a few seconds.
Step 1: Open Terminal
-
Go to Applications > Utilities > Terminal.
-
Or use Spotlight Search by pressing Command + Space, typing “Terminal,” and pressing Enter.
Step 2: Enter the Correct Command
Depending on your macOS version, type the following command and hit Enter:
-
macOS Monterey, Big Sur, and Catalina:
-
macOS Mojave and High Sierra:
-
macOS Yosemite and earlier:
You will be prompted to enter your administrator password. Type it in (you won’t see characters appear as you type), then press Enter.
Step 3: Confirm Success
Unlike some commands, you won’t see a success message. The process runs silently. To be sure it worked, try reloading the website that was giving you problems.
Verifying the Flush
If you want to double-check, you can monitor the DNS cache activity using this command:
This displays a log of DNS activity, showing you that the cache has been reset.
Extra Tips After Flushing DNS
-
Restart your browser – Clear old session data to prevent conflicts.
-
Restart your Mac – While not always necessary, it ensures all processes refresh.
-
Switch DNS providers – If you frequently face DNS issues, try reliable providers like Google DNS (8.8.8.8) or Cloudflare (1.1.1.1).
-
Regular maintenance – Flushing DNS once in a while helps keep browsing smooth.
Conclusion
Flushing the DNS cache on a Mac is a quick and powerful way to fix browsing issues, refresh outdated website data, and improve overall connection stability. Whether you’re running Monterey, Big Sur, or an older version of macOS, clearing DNS only takes a few Terminal commands and can save you hours of frustration.