Issue How to Clear the DNS Cache on Mac

How to Clear the DNS Cache on Mac

The Domain Name System (DNS) is a naming system that is essential for using the Web in an easy-and-efficient way. It is responsible for matching the human-friendly domain names (the popular names of all the pages you know and type into your browser) to their actual machine address represented by a numerical IP address (such as 38.239.182.140). Sometimes, however, errors may occur, and clearing the cache created by the DNS server could help resolve them. The DNS cache can be viewed as a temporary database that stores all recent visits or attempted visits to websites. Mac users can follow the instructions outlined below to clear the DNS cache on their computers. 

Before you start the process, keep in mind that resetting the DNS cache will interfere with your current browsing activities so it is best to save any important work you have opened in the browser. When you are ready, open the Terminal application. You can do that by opening the LaunchPad in the Dock and then typing Terminal in the search bar. 

Once the Terminal window has opened, type the following command:

sudo killall -HUP mDNSResponder; sleep 2;

Now, press Return on your keyboard, enter your admin password if prompted, and press Return once more. A message stating 'macOS DNS cache reset' should appear. 

The same procedure can be used on older macOS versions with the only difference being the command entered into the Terminal window. On macOS Sierra the appropriate command is sudo killall -HUP mDNSResponder;say DNS cache has been flushed while systems running Mac OS X El Capitan and Yosemite require the sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed command to flush the DNS cache.

Loading...