How do I flush my DNS cache on Mac?

Why would I need to do this?

The DNS (Domain Name System) cache contains all the information needed to convert a domain name (such as "RuneScape.com") into it's IP address which is used to request information from the server. If you are having connectivity problems (disconnections or lag), clearing out this cache (called 'Flushing') can help resolve the issue or improve your connection.

How would I do this?

The exact command required to flush your DNS cache on a Mac varies depending on your version of OSX. Click on your version below to see the command required;

OS X Yosemite v10.10.4 and El Capitan v10.11

Use the following Terminal command to reset the DNS cache:

sudo killall -HUP mDNSResponder

OS X Yosemite v10.10 to v10.10.3

Use the following Terminal command to reset the DNS cache:

sudo discoveryutil mdnsflushcache

OS X Mavericks, Mountain Lion, and Lion

Use the following Terminal command to reset the DNS cache:

sudo killall -HUP mDNSResponder

Mac OS X Snow Leopard

Use the following Terminal command to reset the DNS cache:

sudo dscacheutil -flushcache

Having problems with these steps?

Community: Get help on our forums

What if this didn't solve my issue?

We have created a list of more information and solutions to common connection problems - maybe some of them will help out!

Was this article helpful?