How to Flush your DNS Cache on Mac

--

Sometimes a developer has to reset its DNS cache to avoid site preview errors (most of the time when a server transfer occurs).

This article will explain how to flush DNS cache from your Mac!

What is DNS?

DNS, or the Domain Name System, translates human-readable domain names (for example, www.amazon.com) to machine-readable IP addresses (for example, 192.0.2.44).

This article will explain how to flush DNS cache from your Mac!

Flush DNS cache on Mac

To flush DNS cache on your Mac, open your Terminal and run this command:

sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

You might need to reset the DNS cache also from your Chrome browser, to do it:

  • visit: chrome://net-internals/#dns
  • click: “Clear host cache” button
  • restart Chrome

--

--