In this article, we cover the best ways to clear your DNS cache on a Mac, including the different ways you can do that depending on the macOS you are running.
- Flush Dns Cache Mac
- Clear Dns Cache Mac Sierra
- Flush Dns On A Mac
- Clear Dns Cache Macos Catalina
- Mac Os Clear Dns
How to Flush DNS Cache on Mac with Older macOS. The steps above work only for macOS Catalina and Big Sur. If you’re running an older macOS, you need to refer to the appropriate commands below. You will still be using the Terminal to enter the commands, just that the command lines are slightly different. To flush your local DNS cache in Mac OS (up to El Capitan) use your Terminal: Go to Applications Utilities Terminal Type the following command an In order to provide you with the best service, our website uses cookies.
Your DNS cache acts like a memory that your Mac refers to when trying to figure out how to load a website.
Flushing the DNS isn’t a difficult task but the process changes with every new operating system. We’ll walk you through the steps needed to manually reset your DNS on latest macOS versions. But if you like you can fast forward to the automatic solution — with a free tool in CleanMyMac X.
What is DNS cache
So what’s DNS cache? It’s a list of domain names attributed to your last-visited websites. It’s not the same as recent online history. Domain name information is coded in numbers, for example, 174.142.192.113.
For example, when a website migrates to a new domain, its DNS address changes. Naturally, it becomes unreachable as your still Mac relies on the outdated DNS record.
So, DNS cache is a log book that translates this numerical information into human readable website names. After you’ve cleaned the DNS cache you may notice that some websites load slower — that’s perfectly normal. Your Mac has forgot them and is trying to access them from scratch.
How to clear the DNS: The manual way
Before we get started, note that resetting the DNS cache will interrupt active web browsing activity so it’s worth closing your browser before performing a flush.
How to flush the DNS cache on macOS Mojave/Catalina
Are you familiar with Terminal? If not, no problem. All you’ll need to do is launch the Terminal app and paste in a couple of commands.
Flush Dns Cache Mac
- Open the LaunchPad in the Dock and type in Terminal in the search bar.
- Enter the following syntax at the command line:
- Press Return, enter your password, and press Return again.
- You should now see a message saying “macOS DNS cache reset.”
- Exit the Terminal.
sudo killall -HUP mDNSResponder; sleep 2;
How to clear the DNS: The easy way
For those who want to get this done quickly, a much simpler alternative to clear the DNS cache on all versions of macOS is CleanMyMac X. This is a staple Mac cleaning solution and this app is notarized by Apple.
Flushing the DNS cache just so happens to be in its arsenal of features to help you do this.
To flush the DNS cache with CleanMyMac all you’ll need to do is download it — you can do that here for free.
Then…
- Launch CleanMyMac.
- Click on Maintenance from the sidebar menu.
- Select Flush DNS Cache.
- Click Run.
That’s it. Your DNS is all clear and everything should be back to normal. Or you can try one or more of the following methods.
How to clear the DNS on older macOS versions
The algorithm is the same, only the copy/paste command in Terminal will be different for each OS.
To flush DNS cache on macOS Sierra, paste this: sudo killall -HUP mDNSResponder;say DNS cache has been flushed
To flush the DNS cache in Mac OS X El Capitan and Yosemite, paste this:sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed
Frequently Asked Questions
When should you flush or reset the DNS cache?
Flushing the DNS makes sense when you can’t open certain websites. Especially if they were perfectly available just a moment ago. You can also try this fix when your network slows down randomly or other network-related issues occur.
What will happen if I flush my Mac’s DNS cache?
Flushing the cache simply updates the entry on your Mac that corresponds to the server address. Next time you try to access this server i.e a website, it will load a bit slower —which is similar to cleaning your browser cache.
What are the alternatives to flushing the DNS cache on Mac?
If the above methods seem too technical, you may try to do a hard refresh in your browser. Another way to refresh outdated DNS entries is to delete browser caches.
Conclusion
Clearing the DNS cache on Mac isn’t something you’ll have to do often but it’s a good way to troubleshoot named server errors. Use the correct command for your operating system and you’ll be able to resolve issues within seconds. If, for whatever reason, the command doesn’t work or you don’t feel confident using the Terminal, CleanMyMac will do the job for you.
These might also interest you:
Clear Dns Cache Mac Sierra
Anyone who moves about on the internet leaves a lot of traces – even inexperienced browser users probably know this by now. Website operators use technology such as cookies or JavaScript applications to record the behavior of visitors. The data obtained here is used to optimize the website and personalize the content without users actively disclosing personal details. Many users increasingly rely on ad and JavaScript blockers and proxies or delete history and cookies to put an end to data collection and protect their own privacy.
However, very few users are aware that the operating systemalso saves information about surf behavior: for example, the automatically generated DNS cache contains temporary entries about all visited websites. The following sections explain exactly what this cache is all about and why there are several reasons to delete the DNS cache regularly.
What is the DNS cache?
DNS servers are used to convert domain names such as www.example.com into numerical addresses that can be processed by computer systems. These “name servers” are contacted by default via the browser each time the corresponding projects are accessed, which slightly increases their loading time and can also lead to a DNS server overload in the case of a high number of visitors. Error messages like “DNS Server Not Responding” are a common and despised consequence.
For this reason, operating systems like Windows and macOS attach their own cache for called and resolved addresses – the DNS caches. These save all information that’s relevant for name resolution, each with an entry known as TTL (time to live) where data remains valid for a given time. Within this time, corresponding queries are answered directly from the cache without requiring a detour to the DNS server.
Various applications, such as web browsers or name servers from internet service providers, also have their own DNS cache for speeding up name resolution.
What information does the DNS cache contain?
The information units or entries in the DNS cache are called resource records (RR) and are displayed in ASCII code (in compressed form). The various – partially optional – components include the following:
- Resource data (rdata): data that describes the record, for example address or host name
- Record type: type of the created entry, e.g. “A”: IPv4 address (decimal value: 1) or “AAAA”: IPv6 address (decimal value: 28)
- Record name (optional): domain name of the object for which the DNS entry was created
- Time to live (optional): validity period of the resource record in seconds
- Class (optional): protocol group that the RR belongs to (mainly “IN” for internet)
- Resource data length (optional): value for the length of the resource data
The DNS cache contains IP addresses for the respective domains or hosts as well as additional information specifying it – such as the validity period of the record or the appropriate protocol group. For example, an entry for the domain www.example.com (IPv4: 172.27.171.106), which should be valid for one error, would look as follows:
Why is a regular DNS flush useful?
As mentioned earlier, it makes sense to clear the DNS cache regularly. This doesn’t happen by itself: The entries remain in the cache until the defined TTL expires. There are three reasons in particular that you should take action and set the DNS register to zero with a DNS flush, regardless of the actual validity period of the individual records:
- Hide search behavior: While the tracking of user behavior on the internet is primarily carried out by cookies, JavaScript, and others, the DNS cache still offers a potential target for all data collectors. On the basis of the listed addresses, including additional information such as the validity period (if given), you can get an approximate overview of your page history. In any case, your address storage betrays which projects you call up regularly or over a long time. The more comprehensive the collection of cached addresses is, the more you reveal yourself.
- Security against manipulation: You should also clear the DNS cache from time to time for security reasons. The information in the cache is practical for delivering web projects – but can quickly become dangerous in the wrong hands. If cybercriminals gain access to the DNS cache, they’re in a position to manipulate the entries and, for example, redirect you to the wrong websites. This so-called DNS poisoning or DNS spoofing is often used to access sensitive log-in data, for example, to online banking. With a DNS flush, you can also dispose of such manipulated records with minimal effort.
- Solve technical problems: A DNS flush on Windows, macOS, and others is often an effective solution if you’re experiencing technical problems when accessing web applications. For example, it’s possible that an incorrect version of the called website is being displayed due to outdated entries. In such cases, the domain name is probably filed in the cache with an incorrect or old IP address, which can be remedied by clearing the DNS cache. As a result, the request will once again be directed to the appropriate DNS server and not answered from the cache. With the updated address information, the connection to the web project will once again work as planned.
You can display the DNS cache currently stored on your system at any time. In Windows, for example, simply open the command prompt and enter the command “ipconfig /displaydns”.
Clear the DNS cache: how-to
There’s no rule about when the perfect moment for a DNS flush is – unless there’s an urgent problem that can be solved by emptying the cache. The DNS cache should also be cleared immediately if you’re redirected to a site that you didn’t call. This may not necessarily be a spoofing attack based on a manipulated DNS entry, but since such an attack can’t be ruled out in principle, a DNS flush is strongly recommended in such cases.
Regardless of whether you clear the DNS cache for a specific reason or just as a preventative measure, you don’t need to worry about any noticeable effect on your web experience: after resetting the cache, only the first access of a web project should take a bit longer than usual if it was previously loaded from saved resource records.
Since the process of a DNS flush varies from system to system, in the following sections we’ve compiled various lists of instructions for individual operating systems.
Windows 7: how to flush DNS
As a user of Windows 7, you can run a DNS flush via the command prompt. To use this, click on the Windows home button and type “cmd” into the search bar. Then start the command line tool by clicking or pressing enter.
Enter the following command:
Mac mini features the Apple T2 Security Chip — second-generation custom Mac silicon designed by Apple to make Mac mini even more secure. The T2 Security Chip consolidates several controllers into one, and includes a Secure Enclave coprocessor that provides the foundation for encrypted storage and secure boot capabilities. Usb camera for mac mini. Keep in touch with your family and friends with this black j5create USB webcam. Compatibility with Mac OS, Windows and Chrome OS computers offers broad useability, while the HD resolution delivers clear pictures during video calls and live streams. This j5create USB webcam features plug-and-play functionality for a quick, hassle-free setup. Usb camera software, free download - Snap Camera, Chicony USB 2.0 Camera, USB PC Camera (SN9C102), and many more programs. Logitech C920 Pro. Best Webcam for Most People. Resolution: 1080p FPS: 30 Built-in Mic: Stereo.
When you press enter, Windows clears the DNS cache. You’ll receive the following message confirming that the cache was successfully flushed.
Windows 8: run a DNS flush
The command prompt is also your tool for a DNS flush on Windows 8. First, open the start menu via the home button and then search using the magnifying glass symbol. Search for “cmd” and then select the command prompt by clicking.
To clear the DNS cache, enter the following command:
Start the flushing process by pressing enter. A command line message will inform you of the success of the DNS flush.
Windows 10: how to clear the DNS cache
Flush Dns On A Mac
The command prompt works in the same way on Windows 10, and the procedure hardly differs from that of Windows 7 and 8: in the first step, use the search function to look for the command line application cmd.
Music, TV, and podcasts take center stage. ITunes forever changed the way people experienced. Current version of mac. With Google Earth for Chrome, fly anywhere in seconds and explore hundreds of 3D cities right in your browser. Roll the dice to discover someplace new, take a guided tour with Voyager, and create. Mac OS X Snow Leopard was released on August 28, 2009, the last version to be available on disc. Rather than delivering big changes to the appearance and end user functionality like the previous releases of Mac OS X, the development of Snow Leopard was deliberately focused on 'under the hood' changes, increasing the performance, efficiency. You get it all with the new Microsoft Edge—performance, compatibility, and speed to make browsing the web even more effortless. The new Microsoft Edge has built-in features designed to give you more control over your data and to protect your privacy online. The new Microsoft Edge comes complete. Easily check which versions of mac OS, iOS, iPadOS, or watchOS are compatible with your Mac model or iDevice. Guide includes OS X 10.8.x to macOS 11.0.x.
Now clear the DNS cache with the command “ipconfig /flushdns”:
If the process has functioned as desired, then the command prompt confirms the success of the flush process.
Run a DNS flush on Linux: how it works
Linux systems don’t have a DNS cache by default. The different distributions only offer a function to store DNS information locally with the use of appropriate applications like nscd (name service caching daemon), pdnsd, dns-clean, or dnsmasq. If you use one of these services for caching, you have to control it from the terminal in order to clear the cache.
Clear Dns Cache Macos Catalina
For pdnsd, there’s a concrete clear command:
To clear the DNS cache from dnsmasq, dns-clean, or ncsd, though, you need to completely restart the respective service:
How to flush DNS on Mac
Mac Os Clear Dns
Like Windows, macOS has an integrated DNS cache that automatically collects DNS information and so should be cleared regularly. As opposed to the Microsoft systems, though, the command for resetting the cache varies from version to version. What you need to enter into the terminal to set the DNS register back to zero depends on the edition that you’re working with:
macOS 10.12.0 (Sierra):