Cleaning the DNS cache

Sometimes when we are working with web projects, we have re-configure the DNS for any reason, so after that, it couldn’t be possible to connect to our page, so this is set of commands for trying to clean the DNS cache in your computer (thanks to @xmz).

Console-128

For Yosemite, run this command in Terminal:
sudo discoveryutil udnsflushcaches

For Mavericks run:
dscacheutil -flushcache; sudo killall -HUP mDNSResponder

For Lion and Mountain Lion run:
sudo killall -HUP mDNSResponder

For Windows, run this command in command line:
ipconfig /flushdns

For Chrome OS (read more: http://olivermarshall.net/how-to-flush-the-dns-cache-in-chromeos/)

  1. Browse to:
    chrome://net-internals
  2. Select DNS.
  3. Push the “Clear host cache” button.

 

That’s it for today!

See you next time.