Usually, users google how to flush DNS cache on a Mac when encountering errors or other site loading issues. To exclude the possibility of malware causing these problems, start by scanning your device for threats. MacKeeeper’s Antivirus can thoroughly check everything and help delete the found malicious files.
To understand what a DNS cache is, you first need to know what DNS is. When you load a website on your MacBook, you connect to a DNS (Domain Name System) server online. This looks at the web address in your browser, and it then checks that against a database of IP addresses. These IP addresses tell your web browser where to find the server that contains that website. This process is called a DNS lookup.
The DNS cache is a temporary database on your computer of all the recent DNS lookups it’s carried out. This enables your browser to resolve these lookups faster, thereby cutting down web page loading times.
A note from our experts:
In most cases, when you need to flush DNS cache, you have already faced some issues with your Mac's performance. Let's get ahead of the curve to prevent computer malfunctions related to viruses and malware. Antivirus by MacKeeper protects your device 24/7.
Follow the instructions on how to use MacKeeper’s Antivirus:
Select Antivirus from the left side and click Start Scan.
Remove any threats that were detected during the scanning.
Step 1. MacKeeper > Antivirus > Start ScanStep 2. If threats are found, delete them or move to quarantine
How to Flush the DNS on Mac
The steps to empty the DNS cache on your Mac can vary depending on your macOS version. For your convenience, our experts have divided the instructions on how to perform the Mac delete DNS cache process for various iterations of macOS.
For newer macOS versions—Sequoia, Sonoma, Ventura, Monterey & Big Sur (2020 and later), you’ll need to follow the instructions explained below:
Click the Spotlight search button in the toolbar at the top. Alternatively, use Command+Space to do a search.
Type in Terminal, and double-click the Terminal application under Top Hit to open it.
Once Terminal is open, enter this command: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
Enter your Mac’s password and then press Enter to clear the DNS cache.
Step 1. Open SpotlightStep 2. Search for Terminal in SpotlightStep 3. Alternatively, open Terminal via UtilitiesStep 4. Enter the Terminal commandStep 5. Enter the password to confirm the action
Clear the DNS in macOS Catalina and older versions
Older macOS versions use different commands. To flush the DNS cache in these older versions, enter these in Terminal:
In macOS El Capitan or newer, run sudo killall -HUP mDNSResponder.
For macOS Yosemite, enter sudo discoveryutil udnsflushcaches.
In Mac OS Lion, Mountain Lion and Mavericks, the command is sudo killall -HUP mDNSResponder.
In Mac OS Snow Leopard, enter sudo dscacheutil –flushcache.
For MacOS Leopard, run sudo lookupd –flushcache.
In Mac OS Tiger, use lookupd –flushcache.
Once you’ve flushed the DNS cache on your Mac, check the problematic website to see if the problem is fixed, and you’re able to visit the site normally again. If you’ve been wondering why your Safari is so slow and the problem persists post-DNS cache clearing, try other solutions. For example, delete needless extensions and close energy-consuming apps.
How to check DNS cache on Mac
It’s important to check the DNS cache on your Mac before freeing up space, as you’ll then be able to determine whether you actually need to take action or not. Here’s how to check DNS cache in Mac before you delete anything:
Open the Console app, select your Mac, and then enter any:mdnsresponder in the search bar.
Open a Terminal window, and enter sudo killall –INFO mDNSResponder.
Enter your password when prompted. Note that the password won’t appear on your screen, but if you type it correctly and press the Enter key, you should still be fine.
Go back to the Console app and view the list of cached DNS records.
You can also see the DNS cache on your Mac via your web browser. For example, if you’re using Chrome, enter chrome://net-internals/#dns in the address bar to see the list of cached DNS records.
Step 1. Open Console and type any:mdnsresponderStep 2. Open Terminal and type sudo killall –INFO mDNSResponderStep 3. Enter your password in TerminalStep 4. Go back to the Console app and view your DNS cachesStep 5. In Google Chrome, type chrome://net-internals/#dns in the URL bar and hit the Enter key
Should you flush the DNS cache on Mac?
Over time, the DNS cache can become outdated or corrupted—leading to connectivity problems. It can also be affected by malware, causing your browser to take you to malicious sites or phishing schemes.
Performing a Mac DNS cache reset can eliminate these problems. However, if you do find your browser redirecting to malicious sites, it’s not enough to clear cache on your Mac. Also, our team suggests you run a malware scan on your Mac with the help of MacKeeper’s Antivirus.
Here are some of the common internet browsing problems that you can fix when your Mac refreshes the DNS:
DNS spoofing
Error 404
Trouble accessing websites
Your search behavior not being private
DNS record propagation
Now, let’s look at each of these issues—and how to prevent them—in further detail.
1. Prevent DNS spoofing
DNS spoofing involves a criminal using your DNS records to load malicious websites on your device. These redirects occur even when you type perfectly legitimate URLs, and they can lead to both fraud and performance-related problems for your computer.
2. Error 404
Error 404 is one of the most common internet browsing issues, and it typically occurs when a page on the website you’re trying to visit is no longer available. Although 404 errors are often reasonable, you can sometimes see the problem if you don’t regularly empty the DNS cache on your Mac.
3. Trouble accessing a website
Besides seeing 404 errors, web pages might take a long time to load if your DNS cache is full. Long loading times will become irritating over time and stop you from getting the information you require. So, it’s in your best interests to view the DNS cache on Mac and refresh when you feel like it’s becoming an issue.
Hint from our team:
If you’re having slow internet problems, you can perform numerous other steps to get back on track. For example, try turning off your VPN or resetting your Wi-Fi router.
4. Keep the user's search behavior private
When you surf the web, others can see your online activity—especially when you use a public Wi-Fi network. But even if you don’t, advertisers and other third parties can view your search information via your IP address. One way to tackle this is to clean the DNS cache on Mac. This way, advertisers will find it harder to see your search behavior, and so will your internet provider.
5. Prevent DNS record propagation
DNS propagation refers to the time required to update your online DNS records. If you want to remain more private online, clearing your DNS cache can stop propagation. The reason is that it takes time to successfully update your records.
Flushing your Mac DNS cache: Easy and essential
You should see the DNS cache on Mac as a good starting point for solving issues you may have while browsing the web. For example, web pages that won’t load properly are often a symptom of a DNS cache that requires a clearout.
If clearing the DNS cache didn’t work, your Mac could have bigger problems that you must address. Malware might be one of these, and you can check for viruses and whatnot with MacKeeper’s Antivirus. Our tool automatically searches for and quarantines malware, enabling you to do the easy work of removing it and enjoying your browsing experience once more.
FAQs
1. How often should I flush the DNS cache on Mac?
There’s no recommended time span. You can purge your Mac’s DNS cache as often as needed without harming your device, and it’s a good idea to do it every six months or so.
2. Is it safe to flush DNS cache?
Yes, it’s safe to flush DNS cache on your Mac. Cached data is simply temporary storage. Having said that, you shouldn’t clear the DNS cache every day, as this would stop it from doing its job of making the page load faster.
Besides, clearing your Mac’s DNS cache can help you hide your search behavior, protect against manipulation by cybercriminals, and solve technical problems when accessing web apps. But there’s no point in doing it all the time if you don’t need to.
3. How do I clear DNS cache in Safari?
Safari browser also keeps a DNS cache. When you restart the browser, it clears the cache automatically, but you can do the same manually without relaunching the app.
In Safari, go to Safari > Settings in the menu bar.
Click Advanced and then tick the Show features for web developers box to enable the Develop menu.
From the menu bar, select Develop > Empty Caches. Once your browser cache is cleared, quit and relaunch the browser.
Step 1. Safari > SettingsStep 2. Advanced tab > tick Show features for web developersStep 3. Develop > Empty Caches
Once you’ve cleared the DNS cache in Safari, you should find that your browser runs much more effectively than before.
We respect your privacy and
use cookies
for the best site experience.
Privacy Preferences Center
We use cookies along with other tools to give you the best possible experience while using the
MacKeeper website. Cookies are small text files that help the website load faster. The cookies we
use don’t contain any type of personal data meaning they never store information such as your
location, email address, or IP address.
Help us improve how you interact with our website by accepting the use of cookies. You can change
your privacy settings whenever you like.
Manage consent
All cookies
These cookies are strictly necessary for enabling basic website functionality (including page
navigation, form submission, language detection, post commenting), downloading and purchasing
software. The website might malfunction without these cookies.