How to clear local DNS cache?

  1. Home
  2. Knowledge Base
  3. Hosting
  4. How to clear local DNS cache?

How to clear local DNS cache?

The article explains how to clear the local DNS cache. It might be useful if you have made some changes to your online project, but you can’t see it on your home computer.

Windows OS

  1. Press Windows key + X;
  2. Choose “Run“, on the new display enter “cmd” and press Enter;
  3. On your Command line(CMD) enter the following command: ipconfig /flushdns
  4. Done

Mac OS

  1. Choose Applications, then Utilities, and find Terminal;
  2.  Enter the following command based on your Mac OS version:
    • From El Capitan  to Mojave versions: sudo killall -HUP mDNSResponder
    • Big Sur: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  3. After these commands you might be asked for Mac Password, enter it;
  4. Done.


  1.  In the terminal, enter the command: sudo systemd-resolve --flush-caches
  2. After that, you can check your cache statistics using this command: sudo systemd-resolve --statistics
  3. The last command will show the statistics of your cache in a table, at the Current Cache Size you should see 0.
Was this article helpful?

Related Articles