Technology

Flushing the DNS Cache in MacOS

Last modified 9/20/2023

On rare occasions when you are having problems reaching certain websites or online services, it may be necessary to flush the DNS cache in MacOS.

Before You Begin

Domain Name Service (DNS) translates a human-readable domain name address (like www.ilstu.edu) into a machine-readable IP address (like 138.87.246.1).

 Your computer's DNS cache stores DNS query results for a period of time. On rare occasions, it may be necessary to flush your DNS cache. This allows your computer to obtain new DNS query results.

One example of when it would be necessary to flush the DNS cache is when a website's IP address changes. If your DNS cache does not have the new address, you may be unable to reach the site until your DNS cache is updated or you flush your DNS cache (which gives your computer the opportunity to perform a new DNS query and build a new DNS cache).

How to Flush the DNS Cache in MacOS

To flush the DNS cache in MacOS, do the following:

  1. Launch Terminal. To do this, click the Magnifying Glass at the top of your screen and type in 'Terminal'.
  2. In MacOS 10.6 or later, type dscacheutil -flushcache at the command prompt and press Return.
  3. If the command was successful you will see a new prompt. You will not see a message.
  4. At the prompt, type exit and press Return.
  5. Quit Terminal by clicking Terminal Quit Terminal.

 
Terminal image

You have now flushed the DNS cache on your computer.


How to Get Help