Flush Your Local DNS Cache

If your computer has trouble reaching a certain web site or server this may be due to a corrupt local DNS cache. This guide will show you how to clear your local DNS cache (“flush” it) for several operating systems.

 

Windows

  1. First, open an elevated command prompt:
    • In Windows 8 and higher, use the keyboard shortcut Windows key + x to access the Power Users menu, then select Command Prompt (Admin).
    • In previous Windows versions:
      1. Type “command” into the search field at the bottom of the Start menu.
      2. Right-click on the cmd.exe icon.
      3. Select Run as Administrator.
  2. Enter the following command and press the Enter key on your keyboard:

    ipconfig /flushdns

  3. If all goes well, which it should, you will see the following confirmation message:

    Successfully flushed the DNS Resolver Cache.

Mac OS X

Launch Terminal and enter the appropriate command for your version of OS X, followed by the Enter key on your keyboard:

  • Mac OS X versions 10.10.4 and newer:

    dscacheutil -flushcache; sudo killall -HUP mDNSResponder

  • Mac OS X versions 10.10-10.10.3:

    sudo discoveryutil mdnsflushcache; sudo discoveryutil udnsflushcaches

  • Mac OS X versions 10.9:

    sudo killall -HUP mDNSResponder

  • Mac OS X versions 10.6-10.8:

    sudo dscacheutil -flushcache

Linux

Many current Linux distributions do not utilize a local DNS resolver cache like Windows and Mac OS X. If you do not know whether your Linux installation is utilizing local DNS caching, please see the website for your Linux distribution and look for information regarding default included software.

  • One of the most commonly used DNS caching Linux applications is NSCD (Name Service Caching Daemon). If you have NSCD installed, you can clear the local DNS cache by running one of the following commands in your favorite terminal/shell application:
    • To clear local DNS cache for current user:

      nscd -i hosts

    • To clear local DNS cache for all users:

      nscd -I hosts

  • Some Ubuntu and Debian-derived distributions can flush the cache with:

    sudo service dns-clean restart

  • 0 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

How to Use Traceroute

Last updated June, 2019   Traceroute is an application that traces the path data takes from one...

Edit Your DNS Hosts File

One of the most powerful tools available to anyone working on their site during a migration is...

Clear Your Browser Cache

Your browser has a local file store that contains the images, CSS, JavaScript and other files of...