How to clear DNS cache in macOS

You don’t usually have to mess with the DNS cache (Domain Name System) for Mac. Basically, it works as expected in the background, directing you to the right website towards the web address. Overloading such data can lead to corrupted DNS cache on the Mac, resulting in loading problems and the infamous 404 error. You can quickly fix the problem by clearing the DNS cache in macOS. Here’s how.

There can be several factors that affect the DNS cache on macOS. This can be due to network attacks, viruses, or damage to IP address mapping for well-known websites.

For example, when you type “” in the address bar, your browser may redirect you to another malicious website that the attacker added to your Mac’s DNS (domain name system). Instead of a Twitter homepage, you will continue to get 404 errors.

How to clear DNS cache in macOS

Clearing the DNS cache on your Mac will clear all saved DNS lookup information. Here’s how you can clear DNS cache in macOS:

Step 1: Press Command + Space and open Spotlight search to me.

Step 2: Enter “Terminal”And open the application. You can also open the Terminal on a Mac via Launchpad.

Step 3: When you open the Terminal, enter the code below.

“Sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder ”

Step 4: Press come in, and the Mac will ask you to verify your identity. Enter the password and press Enter again to clear the DNS cache.

clear dns cache

After clearing the DNS cache on your Mac, problematic websites on Safari should behave normally again.

This trick works with macOS Big Sur and newer versions. If you are using an older version of macOS, you need to run the following command in a terminal.

  • For macOS El Captain or later – “sudo killall -HUP mDNSResponder”
  • macOS Yosemite – “sudo discoveryutil udnsflushcaches”
  • For macOS Lion, Mountain Lion and Mavericks – “sudo killall -HUP mDNSResponder”

Apple executives call the macOS ecosystem a security nightmare because of Mac’s open nature to download unfamiliar apps from the web. If you’re not careful, you could end up installing fake or duplicate applications that contain malware and viruses. Here come third-party tools like AdLock.

AdLock for Mac

Optimized for M1 Macs, AdLock offers secure browsing and anti-tracking tools to protect your Mac from malware and malicious files. The source software comes with DNS filtering, HTTPS filtering, detailed statistics and more. Go ahead, try the link below and protect your Mac.

Download: AdLock – AdBlocker for Mac

We suggest that you bookmark this article and visit it again if you experience web browsing issues on your Mac in the future.

Source link

Naveen Kumar

Friendly communicator. Music maven. Explorer. Pop culture trailblazer. Social media practitioner.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button