TL;DR
To flush DNS cache on your macOS Sequoia:
- Open Terminal.
- Type: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Enter your password if asked.
Tried and Tested ✅: The methods and steps mentioned in this article have been tried and tested firsthand by Ojash Yadav on his MacBook Pro M3 and rechecked for errors on Hashir’s MacBook Air M2.
If you’ve ever had issues with websites loading slowly or not at all, DNS cache could be the reason. Flushing it is a quick fix that often gets things back to normal. Here is how you can do it.
What is DNS Cache, Why Flush It, and When?
DNS cache temporarily stores the IP addresses of websites you visit, making them load faster by skipping the DNS lookup process.
Why Should You Flush It?
Flushing DNS cache removes outdated or incorrect entries, which can solve issues like slow page loading, website errors, or connectivity problems.
When Should You Flush It?
- If you’ve recently dealt with malware or network security issues.
- When websites are not loading or displaying correctly.
- After changing your DNS settings (e.g., switching to Google DNS or Cloudflare).
How to Flush DNS Cache on Your Mac
Why You Can Trust MacBook Journal We always conduct first-hand research and verify every method or solution we present, ensuring you receive reliable and effective advice. Learn more about our process.
Flushing DNS cache on a Mac is a quick process that can help resolve network issues. Follow the steps below based on your macOS version, starting from the latest to the older versions.
Note: The process for flushing DNS cache can vary slightly depending on the macOS version you’re using. Make sure to follow the right steps for your specific version.
For macOS Sequoia, Sonoma, and Ventura
- Open Terminal (you can find it using Spotlight Search or in Applications > Utilities).
- Type the following command and press Enter:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Enter your administrator password if prompted, and press Enter again.
- You won’t see any output, but the cache has been flushed. Close Terminal.
For macOS Monterey, Big Sur, and Catalina
- Type this command and hit Enter:
sudo killall -HUP mDNSResponder
- Provide your administrator password if required.
- Once the command runs, the DNS cache is cleared.
For macOS Mojave and High Sierra
- Use the following command to flush the DNS cache:
sudo killall -HUP mDNSResponder
- Input your password, press Enter, and the cache is flushed.
For macOS Sierra and Earlier Versions
- Enter this command:
sudo discoveryutil mdnsflushcache
- Press Enter, provide your password, and the DNS cache will be cleared.
Be cautious when using Terminal commands that require administrative rights. A slight error in command execution could lead to system issues.
macOS Version | DNS Flush Command |
---|---|
Sequoia | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
Sonoma | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
Ventura | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
Monterey | sudo killall -HUP mDNSResponder |
Big Sur | sudo killall -HUP mDNSResponder |
Catalina | sudo killall -HUP mDNSResponder |
Mojave | sudo killall -HUP mDNSResponder |
High Sierra | sudo killall -HUP mDNSResponder |
Sierra | sudo discoveryutil mdnsflushcache |
El Capitan and Earlier | sudo discoveryutil mdnsflushcache |
Please note that all these commands are version-specific and should be executed with caution. Always double-check your macOS version and ensure you’re using the correct command to avoid potential issues
How to Check Your DNS Cache on a Mac
To view the DNS cache on a Mac, you can use the following steps. This will show you the cached DNS entries currently stored by your system:
- Use Spotlight Search (Cmd + Space) and type Terminal.
- To check the DNS cache contents, use this command:
sudo dscacheutil -cachedump -entries
This will show you a detailed list of cached DNS entries
- If you’re using macOS versions like Sierra or earlier, use the following command instead:
sudo discoveryutil udnsflushcaches
You will see a list of domain names that your system has cached. This information can be useful for troubleshooting DNS-related issues.
Flush DNS Cache on Your Mac
Now that you know how to flush DNS cache on your Mac, you may want to improve your browser experience further. Here are a few tips to get you started:
- Clearing your browser cache on Mac can fix website loading issues and improve browsing.
- If a website is causing trouble, you can easily block it on Safari, Chrome, or Firefox.
- A slow internet connection can cause problems, so check that before advanced troubleshooting.