Flush DNS cache on your Mac
Knowing how to flush DNS cache Mac computers hold onto is not something most users need day to day, but it’s a skill we should all have. The DNS cache is typically a record of your browsing history, and flushing it can help resolve issues when browsing the web.
When you’re unable to access a website, and the issue isn’t clear, it may be that you need to clear DNS cache Mac is saving. Here, we’ll show you how to flush DNS on Mac, the best OSX flush DNS apps and tools, and tell you which apps make it easy to ditch your DNS cache and get back to browsing the web.
What is DNS cache
We’ll tell you how the Mac flush DNS system works in a second, but first let’s understand the DNS system a bit better.
DNS is acronymous for Domain Name System. The term ‘domain name’ should be familiar; it’s the naming system for computers connected to the internet, sort of like an address book for the web. If you’re connected to the internet, you’ve got a DNS too!
When you visit a website for the first time, your Mac caches (or stores) that website’s DNS data, which is encoded in a series of numbers. It’s why visiting a webpage a second time is faster than the first. Think of it like your Mac memorizing directions to a website.
A DNS cache is your Mac’s full memory of where websites reside on the web. So those numbers your Mac has memorized help it get to the end destination (a website) quickly. Those numbers (something like 123.456.789.000) correspond to a domain the site is hosted on. When sites move domains, their number sequence may change, too.
When you have trouble finding a website you’ve visited before, a Mac clear DNS cache protocol may be in order.
Best way to flush DNS cache on a Mac
The best app to flush DNS cache Mac tucks away is CleanMyMac X.
CleanMyMac X does a lot more than a Mac flush DNS cache, though. It’s the single best app you can have to perform routine maintenance on your Mac, and keep your machine running in peak condition for a longer period of time. The app offers a ‘Smart Scan’ feature that looks for unnecessary files on your Mac, potential malware or privacy threats, and helps speed up your Mac.
The litany of features CleanMyMac X has seems endless. It can perform a much deeper cleanup of your system (ncluding DNS cache), run distinct malware and privacy maintenance, update apps, delete unwanted apps from your Mac, and take a holistic view of your storage space with its incredible Space Lens feature.
Flushing DNS on your Mac couldn’t be simpler with CleanMyMac X, either. Here’s how it’s done:
- Open CleanMyMac X on your Mac
- On the left side of the app window, select “Maintenance”
- Select “Flush DNS Cache”
- Click “Run” at the bottom of the window
That’s all it takes! Four simple clicks and your Mac’s DNS cache will be cleared.
Clear DNS cache Manually
Clearing DNS cache manually is a bit fussier. You have to know which version of macOS you’re running, then dive into the Terminal app and enter specific commands.
First, check the version of macOS you’re running. Here’s how:
- From the menu bar on your Mac, select the Apple logo in the top left corner
- Select “About this Mac”
The window that pops up will tell you exactly which version of macOS you’re running. Once you’ve done that, here’s how to flush your DNS cache manually.
macOS Big Sur (11.0.1) % Monterey (12.1)
- Open Terminal on the Mac
- Enter the following command: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Enter the Mac’s password
- Press the enter key
macOS El Capitan (10.11), Sierra (10.12), High Sierra (10.13), and Mojave (10.14)
- Open Terminal
- Enter the following command: sudo killall -HUP mDNSResponder
- Enter the Mac’s password, if prompted
- Press the enter key
macOS Yosemite (10.10)
- Open Terminal on your Mac
- Enter the following command at the prompt: sudo discoveryutil udnsflushcaches
- Press the enter key
macOS Mavericks (10.9)
- Open Terminal on the Mac
- Enter the following command at the prompt: sudo killall -HUP mDNSResponder
- Press the enter key
Bonus tips for your Mac
Slow web browsing isn’t always because of some issues with your DNS cache. It’s possible your network is experiencing issues, or your Mac is just being overworked. If you don’t have an app like iStat Menus, diagnosing your Mac’s performance issue can be difficult.
Where CleanMyMac X helps solve issues, iStat Menus helps you identify them. Living in your Mac’s menu bar, iStat Menus constantly monitors your Mac’s memory, CPU, disk space, network, and sensors. Hovering over any of its components brings up rich menus with additional details on what’s going on with your Mac.
Hovering over the network menu tells you what’s connected, what processes are running that occupy network bandwidth, and the IP address you’re connected to. There’s nothing to even click; iStat Menus simply surfaces all the necessary info on demand.
While iStat Menus and CleanMyMac X are great at diagnosing and clearing up issues on your Mac, you should always have backups of your data and the full system of macOS you’re running. You could use the cloud to backup everything, but that can get expensive – quickly. It’s better to control your data backups, and for that you’ll need Get Backup Pro.
Get Backup Pro allows you full customization of your backups. You can choose which data is backed up, and how often. Each backup is listed as a “project” in Get Backup Pro, making it easy to create several different backup events for the data you want, and the app can schedule all of these projects to backup automatically. Even if you forget to back your data up, Get Backup Pro will remember.
Flushing DNS cache is key to helping your Mac run smoothly. It may cause a temporary slowdown for websites you visit often, but can eliminate troubling performance issues when the cache is incorrect.
One major issue with incorrect DNS caching is your Mac won’t tell you it’s having an issue. It’ll just keep trying to connect, and bog everything down in the process. Even with the best diagnostic tools, knowing the specific errors with your DNS cache is impossible. Flushing it is an all or nothing proposition, too.
That’s why routine maintenance is critical. So is properly diagnosing what’s going on with your Mac. CleanMyMac X and iStat Menus are the perfect duo for monitoring and maintaining your Mac for long-term stability and health. Both operate in the background, and only interact when it’s time to perform maintenance or surface issues.
Backups are also important, and Get Backup Pro is the best solution for those who want more control over their Mac’s backup program. If you’re looking for the perfect solution, cleaning your Mac up with CleanMyMac X just before a full backup with Get Backup Pro will leave you with the cleanest, most efficient backups possible.
All three of these apps – iStat Menus, Get Backup Pro, and CleanMyMac X – are available for free during a seven day trial of Setapp, the world’s best suite of apps for your Mac. Along with these three apps, you’ll have immediate and unlimited access to the full suite of nearly 200 apps available via Setapp.
When your week-long trial is through, maintaining continued and unlimited access to Setapp is only $9.99 per month. It’s an incredible bargain for so many apps, so why wait? Give Setapp a try today!
FAQ
Can I check my DNS cache on a Mac?
In latest versions of macOS, including Monterey, you can’t easily view your DNS cache as it’s set to private.
In previous macOS versions, DNS cache was viewable using the following steps. Open Console app in Finder > Applications, select your Mac and type in any:mdnsresponder in the search bar, hit Enter. Open Terminal in Finder > Applications and run sudo killall -INFO mDNSResponder. Return to the Console app and view your list of cached DNS.
When should I reset the DNS cache?
DNS cache reset helps you keep your cache up to date. You can reset your DNS cache once in a while to get rid of system errors, manipulated with or outdated addresses, as well as to help improve your internet connectivity.
If you keep seeing a 404 error where it shouldn’t be, or have other issues accessing a website, a DNS cache reset can help fix that.
The periodic reset can also be a privacy tool since DNS cache stores the information about the websites you visit.
Another reason to reset your DNS cache is to protect it from spoofing (when false information is entered in the cache and you may be directed to a different website from the one you intended to visit).
Is it safe to flush DNS cache?
In most cases, yes, it’s safe, and your computer can easily build up the cache from scratch as you visit new or previously opened websites.