www.mydoodads.com

Menu

How to Clear and Reset DNS on MacOS

Apple - Articles - macOS - macOS troubleshooting

Issue:

When browsing the internet you encounter a large number of 404 errors, or web pages fail to load.

Resolution:

This issue maybe related to a problem with your DNS (Domain Name System) and could be fixed by forcing the computer to clear/reset DNS.  

DNS is like a digital Yellow Pages, but rather than matching peoples names, addresses and telephone numbers. DNS is used to convert IP addresses to domain names or domain names to IP addresses.

After visiting a website, the sites address is stored locally on your computer in something called a “Cache“. Clearing DNS will  force your computer to re-download the IP addresses and domain names, thus updating the Cache.

On a Macintosh computer, it is worth noting that rebooting the computer clears the DNS Cache. However, the  below Terminal command is often used by people in IT departments, who do not want to waste time waiting for a computer to reboot.

  • Open the Terminal application. found in the Utilities folder within Applications
  • Enter the following command syntax exactly (use copy and paste if in doubt about syntax accuracy):
sudo -s
sudo killall -HUP mDNSResponder;say DNS cache has been flushed
  • Hit the Enter key
  • You will be prompted for the admin password (this is necessary because of sudo privileges)
  • Enter the administrators password
  • Wait until you are notified that the DNS cache has been cleared.
  • The computer will say “DNS cache has been flushed”.
  • You can now close the Terminal pane.