Languages

OS X: How to reset the DNS cache

Learn how to reset (flush) the DNS cache.

OS X Mountain Lion or Lion

Use the following Terminal command to reset the DNS cache:

sudo killall -HUP mDNSResponder

 

Mac OS X v10.6

Use the following Terminal command to reset the DNS cache:

sudo dscacheutil -flushcache

Additional Information

When you might want to do this

OS X keeps a local cache of resolved DNS queries for a time defined by the DNS server, but sometimes it may be necessary to reset the cache immediately and re-query a DNS server. For example, you might do this after an entry on the server is changed or a new entry is added.

Last Modified: Aug 7, 2012
Helpful?
Yes
No
Not helpful Somewhat helpful Helpful Very helpful Solved my problem
Print this page
  • Last Modified: Aug 7, 2012
  • Article: HT5343
  • Views:

    405364
  • Rating:
    • 62.0

    (1842 Responses)
Start a Discussion
in Apple Support Communities
See all questions on this article See all questions I have asked