Clearing Local DNS Cache

After you clear your local DNS cache, you should also reboot the network equipment (routers, modems, etc.) within your premises.

 

Clearing the local DNS cache on Windows

  1. Press ⊞ Win+R on your keyboard to open the Run application.
  2. Input the following command in the Run application window:

    cmd

  3. Press ↵ Enter to open Windows Command Prompt. If your Windows account does not have admin rights, press Ctrl+⇧ Shift+↵ Enter.
  4. Execute the following command in Windows Command Prompt:

    ipconfig /flushdns

  5. Press ↵ Enter, and you should receive the following output:

    Windows IP Configuration

    Successfully flushed the DNS Resolver Cache.

 

Clearing the local DNS cache on macOS

  1. Press Ctrl+⌥ Option+⇧ Shift+T or go to “Finder” > “Applications” > “Utilities” > “Terminal” to open Terminal.
  2. Input the following command in Terminal:

    dscacheutil -flushcache;sudo killall -HUP mDNSResponder

  3. Press ↵ Enter to execute the command.
  4. Enter your Administrator password as this operation requires administrator privileges.

 

Clearing the local DNS cache on Linux

Not all Linux distributions use the same DNS service by default, and Linux allows you to install alternative DNS services, so please refer to the official documentation of your Linux distribution and/or alternative DNS service for instructions on clearing your DNS cache.

You can find instructions on how to clear the DNS cache on a default Ubuntu installation and few alternative DNS services (binddns, dnsmasq, and nscd) listed below:


Ubuntu (default installation)

To clear your local DNS cache on Ubuntu, you need to:

  1. Press Ctrl+Alt+T to open a Terminal window.
  2. Execute the following commands:
    sudo /etc/init.d/dns-clean restart
    sudo /etc/init.d/networking force-reload

binddns

To clear the binddns cache:

  1. Open a Terminal window. The default keyboard shortcut is Ctrl+Alt+T.
  2. Execute the following commands:

    sudo /etc/init.d/named restart
    sudo rndc restart
    sudo rndc exec


dnsmasq

Follow the steps listed below to clear your dnsmasq cache:

  1. Open a Terminal window. The default keyboard shortcut is Ctrl+Alt+T.
  2. Execute the following command:

    sudo /etc/init.d/dnsmasq restart


nscd

You can clear the cache of nscd by performing the following actions:

  1. Open a Terminal window. The default keyboard shortcut is Ctrl+Alt+T.
  2. Execute the following command:

    sudo /etc/init.d/nscd restart

Close Menu