How to clear DNS on Mac OSX


When working with websites, a lot of the time you will need to have control over your DNS.
DNS makes use of a performance enhancement called caching. This caching is great for regular use, but can be a pain if you need to bypass it.

You can clear the cache by typing in the terminal
To launch Terminal, Command + Space to launch Spotlight, type terminal, hit enter.

OS X Yosemite
sudo discoveryutil mdnsflushcache

OS X Mavericks, Mountain Lion, and Lion
sudo killall -HUP mDNSResponder

OS X Snow Leopard v10.6
sudo dscacheutil -flushcache

OS X Tiger v10.4
lookupd -flushcache


Have more questions? Submit a request