How to Clear DNS Cache on Mac (All Versions)
If you are facing connection issues on your MacBook, you might want to know how to clear the DNS cache on your Mac. That’s because the DNS cache acts like a memory that your device refers to when trying to load a website or a server.
Clearing the DNS cache on Mac isn’t a difficult job. Depending upon your operating system settings, you can quickly clear the DNS cache on Mac. So, let’s not waste any more time, and let’s reset your DNS on all leading MacOS versions.
What is Exactly DNS Cache?
The DNS cache might sound like a super-complicated tech term, but it isn’t. Domain Name System, aka DNS, lists all domain name attributes to websites visited by you. Remember that it isn’t similar to your recent online history. Domain name information is coded in numbers like 123.142.113.192.
And whenever you navigate to a new domain, its DNS address changes. If your Mac relies upon outdated DNS records, it can connect to your desired websites.
The DNS cache is compressed of multiple components, including:
- Resource Data: Records descriptions such as the hostname and address.
- Record Type: Categorize the type of record i.e., A or AAAA records.
- Record Name: This shows the DNS entry’s domain name.
- Time To Live (TTL): Resource data validity time.
- Class: Appropriate protocol group.
- Resource Data Length: It is the resource data’s value.
Why Clear DNS Cache on Your Mac Occasionally?
Mac and other OS platforms perform DNS caching to reduce the DNS servers’ burden during high traffic. It is TTL’s responsibility to determine the cache’s validity period. Till the cache files are valid, your content requests will process without going through the DNS server.
But if you are using outdated DNS cache files, that can expose you to security vulnerabilities. Sometimes, Mac saves a bad DNS cache when you visit a website that just moved to a new domain name. Therefore, we highly recommend clearing the DNS cache on your Mac.
Here are a few other reasons to periodically clear your DNS cache:
- Storing DNS records makes it easier for hackers to track your search behavior and predict your browser history.
- The DNS cache files are targeted for DNS spoofing that can endanger your sensitive information.
- Importantly, clearing the DNS cache on Mac can solve connection issues and wrongly displayed web content.
How to Clear DNS Cache in Mac
As you know what DNS is and why to clear it, let’s move to the main topic: how to clear DNS cache in Mac.
Before we get started, you have to get familiar with Terminal commands to clear the DNS cache on macOS. Otherwise, you can use the Terminal app and paste the command to clear the cache. So, let’s see how to clear DNS cache on the latest macOS:

- Go to Applications > Utilities or press Command + Space keys to launch Spotlight and search for Terminal.
- Paste the command sudo killall -HUP mDNSResponder in Terminal and press the Return key on your keyboard.
- Now, enter your administrator password for the account and hit Return. And your DNS cache is cleared.

Interestingly, you can also hear an audio notification when DNS flush is complete using:
sudo killall -HUP mDNSResponder; say dns cleared successfully
How to Clear DNS Cache on Older MacOS and MacOSX Versions
The initial process is the same where you have to open the Terminal app. But the commands for clearing the DNS cache on most MacOS versions are different. You can use the following commands based on your device’s OS:
| Operating System | Terminal Command |
| Mojave (version 10.14)High Sierra (version 10.13)Sierra (version 10.12)Mountain Lion (version 10.8)Lion (version 10.7) | sudo killall -HUP mDNSResponder |
| El Capitan (version 10.11)Mavericks (version 10.9) | sudo dscacheutil -flushcache sudo killall -HUP mDNSResponder |
| Yosemite (version 10.10) | sudo discoveryutil mdnsflushcache sudo discoveryutil udnsflushcaches |
| Snow Leopard (version 10.6)Leopard (version 10.5) | sudo dscacheutil – |
| Tiger (version 10.4) | lookupd -flushcache |
Alternative Way: How to Clear DNS Cache on Mac
If you aren’t comfortable clearing the DNS cache on your Mac manually, you can use a tool. Yep, you can use cache cleaning tools to automatically remove DNS files from your Mac. For example, CleanMyMac X is a great Mac maintenance tool that can clear DNS cache too. All you need is to download CleanMyMac X on your device and:
- Launch the software.
- Click on the System Junk Tab in the sidebar.
- Navigate through the list of found items and click Clean.
That’s it! All outdated DNS cache files will no longer trouble your connections.
Extra Facts About Clearing the DNS Cache on Mac
- Once you clear DNS cache files from your Mac, the next time you try to open a website, it will load a bit slowly.
- You can also delete browser caches to delete outdated DNS entries.
- Even if your network randomly slows down, you can cache DNS files to fix it.
Wrapping Words
There are tons of reasons to regularly clear your DNS cache on Mac. It keeps your system up-to-date, secures your private data, prevents phishing, and so much more. Most importantly, it is super simple to clear DNS caches.
Periodically, take two minutes out of your schedule and clear your DNS files for safe and fast browsing. And, keep on following us for the more informative posts.
Popular Post
Recent Post
How To Connect to Your PC Remotely Windows [Complete Guide]
Many people need to reach their computer from far away. Well, yes! It may be for work, study, or personal use. Remote access helps you open files, use your apps, and control your system even when you are not near the device. It gives you the comfort of using your computer anywhere through the internet. […]
How To Connect to a Wi Fi Using a QR Code: Latest Guide
Wi-Fi is now a basic part of our lives. We use it at home, in offices, schools, and public places. But typing long passwords every time you connect can be annoying. Sometimes you might even forget your Wi-Fi password. That is where QR codes come in handy. With QR codes, you can connect to any […]
How To Connect a Wireless Printer Easily to Windows 11/10 PC
Printing tasks are part of most home and office work today. Isn’t it? Well, yes! Using a wireless printer makes printing easier and faster because you don’t need cables. It allows you to print documents and images from any corner of your room as long as your device and printer are connected to the same […]
How To Connect Your Windows 11 PC to a Projector or Another PC
A bigger screen can help you share your work with others. When you connect your Windows 11 PC to a projector, your screen becomes easier to view in a meeting room, classroom, or home. You can show slides, videos, notes, or entertainment. Most people do this for work or study, but it is also helpful […]
How To Set Up Dual Monitors Easily Windows 11/10: Complete Guide
Working with one screen can feel limiting. You switch between apps constantly. Your workflow slows down. A dual monitor setup changes everything. It gives you more space to work. You can see multiple things at once. This guide shows you how to set up dual monitors easily on Windows systems support. Windows 11 and Windows […]
How to Set Your Preferred Default Printer On Windows 11/10: Complete Guide
Printing documents should be simple. But many users struggle with their printer settings. Windows often picks the wrong printer as the default. This creates delays and wastes paper. Setting up your preferred printer as the default saves time. It prevents printing errors. This guide shows you how to set your preferred default printer Windows systems […]
Ashampoo WinOptimizer Review: Can It Really Speed Up Your PC?
Is your computer running slowly? Do programs take forever to load? You’re not alone. Millions of PC users face this problem daily. Ashampoo WinOptimizer claims it can fix these issues. This software promises to clean junk files, boost speed, and make your computer run like new. But does it really work? Or is it just […]
Screen Mirroring | Screen Cast Phone to Laptop Windows 11
screencast phone to laptopScreen mirroring is a great way to show your phone’s screen on a laptop. Right? Whatever you see on your phone, videos, games, apps, it shows up on the bigger screen too. It’s great for watching with friends, sharing ideas, or just getting a better view. Lots of people think it’s hard […]
Avast Cleanup PC Cleaner and Optimizer: Everything You Need to Know
Your computer gets slower over time. This is normal but frustrating. Files pile up. Programs start automatically. Your PC takes forever to boot up. You need a solution that works. Something simple but effective. Avast Cleanup promises to fix these issues. But does it really work? This guide covers everything about Avast Cleanup. You’ll learn […]
How to Recover Permanently Deleted Files in Windows 10/8/7
Losing important files can feel like a disaster. Well, yes! Maybe you deleted something by accident. Maybe you emptied the Recycle Bin a little too quickly. Suddenly, that crucial document or cherished photo seems lost forever. But take a deep breath. Windows 10 (and even 8 or 7) offers powerful ways to recover permanently deleted […]


