Clearing DNS cache on OS X

Your computer caches DNS lookups for a short period of time. If you added a hostname to your hosts file (can be handy when testing websites locally that depend on the domain name), or changed DNS records at your ISP, you need to clear the cache to be able to see those changes.

On a Mac OS X system it is done as follows

Open the “Terminal” app. Issue this command:

dscacheutil -flushcache

On older Mac OS X systems you need to use this command:

lookupd -flushcache

Comments

comments powered by Disqus