Reset the DNS cache in OS X

Reset the DNS cache in OS X

Learn how to reset (flush) the DNS cache.

About the DNS cache

OS X keeps a local cache of resolved DNS queries for a time defined by the DNS server. Sometimes it might be necessary to reset the cache immediately and re-query a DNS server. For example, you might need to do this if you are a network or server administrator and an entry on your DNS server has recently changed.

If your Mac isn't using the latest DNS entries from your server, you can restart your Mac to update its cached information. If you need to update DNS entries on a server using OS X and you can't restart the server, use the terminal commands below for the version of OS X you're using.

OS X Yosemite

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 v10.6

Use the following Terminal command to reset the DNS cache:

	sudo dscacheutil -flushcache

 

Latest Post

Popular Post

Our Skills

Author

Project Director Information Architect Database Administrator Unix Administrator Senior Developer Project Manager Product Manager Web Marketer Cloud Engineer

Contact Us

For any questions or project ideas please contact me at the following.

I'm here