KNOWNHOST WIKI

User Tools

Site Tools


dns:how-to-clear-dns-cache-on-your-computer

How To Clear DNS Cache On Your Computer

Clearing DNS cache on your computer, but not within a web browser, varies depending on the operating system and OS version you're running. Regardless, there's typically just a few steps to get the job done.


Windows 10

On Windows 10 computers, the DNS cache can be cleared with these steps:

  1. Launch a command prompt as administrator
    • Click on Start
    • Type CMD and press Enter
    • Right click on Command Prompt and select Run as Administrator
  2. In the text box, type ipconfig /flushdns and press Enter


macOS

The many flavors of macOS mean that the approach for clearing the DNS cache will vary depending on the specific version you're running.

macOS Lion (10.7), Mountain Lion (10.8), Mavericks (10.9), El Capitan (10.11), Sierra (10.12), High Sierra (10.13), Mojave (10.14), and Catalina (10.15)

Open the command line interface, aka Terminal and run the command:

  sudo killall -HUP mDNSResponder

Then enter your computer password when prompted.


macOS Yosemite (10.10)

In Yosemite, the process is similar with using Terminal to run a command:

  sudo discoveryutil udnsflushcaches

Then enter your computer password when prompted.


macOS Snow Leopard (10.6)

For macOS Snow Leopard (10.6), use Terminal to run a command:

  sudo dscacheutil -flushcache

Then enter your computer password when prompted.


macOS Leopard (10.5)

For macOS Leopard (10.5), use Terminal to run a command:

  sudo lookupd -flushcache


Linux

Many linux distributions don't have DNS caching enabled by default while those that do make use of DNS caching rely on services which vary.

Clearing DNS cache on linux…


For systemd-resolved

  sudo systemd-resolve --flush-caches


For BIND

  sudo rndc flush

or

  sudo /etc/init.d/named restart


For dnsmasq

  sudo systemctl restart dnsmasq

or

  sudo /etc/init.d/dnsmasq restart


For ncsd

  sudo /etc/init.d/nscd restart
dns/how-to-clear-dns-cache-on-your-computer.txt · Last modified: 2020/11/27 11:03 by Karson N.