The domain name system is a global distributed database of matching all web addresses and IP addresses. When you go to different sites, the browser converts the name to an IP address and this data is stored locally on your computer in a cache to speed up access to the same site with the same domain name. And the whole system works well most of the time, but at the same time it makes it difficult to quickly see the changes you are making in the DNS system.

For example, the site has changed the IP address to another, and you still have the old cache in the cache and therefore the site simply does not open.

How to Flush DNS cache in Windows?

To clear DNS cache on a windows computer follow there steps :

  • Start command prompt. To do this, click Win + R, enter cmd and then OK.
  • At the command prompt, enter command: ipconfig /flushdns
  • On successful completion of the command you will see message Successfully flushed the DNS Resolver Cache.
flush dns windows command

Clear DNS Cache on Linux

For Ubuntu: sudo service network-manager restart
For other distributions: sudo /etc/init.d/nscd restart

Clear DNS Cache on Mac


In the Apple operating system, all commands are entered in the "Terminal". The easiest way to get into it is through Spotlight: click on the search icon in the upper right corner.

  • You can find it another way: open Finder → “Programs” → “Utilities” → “Terminal”.
  • Command to be entered on console varies form differnt make of MAC OS
  • Sierra High: sudo killall -HUP mDNSResponder; sleep 2; echo macOS DNS Cache Reset ;
  • Capitan el: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder ;
  • Yosemite: sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder ;
  • The Mavericks: dscacheutil -flushcache;sudo killall -HUP mDNSResponder ;
  • Mountain Lion & Lion: sudo killall -HUP mDNSResponder ;
  • Leopard: dscacheutil -flushcache ;
  • Tiger: lookupd -flushcache ;
  • After that, you will be prompted enter the password and wait for the macOS DNS Cache Reset message .
By clicking "Accept" or continuing to use our site, you agree to our Website's Privacy Policy