How to Flush/Reset your DNS Cache in Windows (Vista, 7, 8, 10), Mac (10.5 - 10.10), and Linux

How to Flush/Reset your DNS Cache in Windows (Vista, 7, 8, 10), Mac (10.5 - 10.10), and Linux

by Mihai Neacsu on 28 October 2014 · 5442 views

Windows, Mac OS X, Linux, and DNS clients are caching DNS results and IP addresses in order to make future requests to the same hostnames faster. On some occasions, the cache will contain bad results so it needs to be cleared in order for the OS and DNS clients to communicate correctly with the server hosts.

A somewhat common problem is when certain web pages are not resolving correctly. At that point, an easy fix to try is to clear or flush the cache of the local DNS nameserver on your machine. Here's how to do just that for the most popular Operating Systems.

Windows Vista, 7, 8, 8.1, 10

  1. Open an Elevated Command Prompt.
  2. Type in ipconfig /flushdns, then Enter.

1 full How to FlushReset your DNS Cache in Windows Vista 7 8 10 Mac 105  1010 and Linux

Windows 98/NT/2000/XP

  1. Open a Command Prompt by pressing Start > Run > cmd.exe > OK.
  2. Type in ipconfig /flushdns, then Enter.

Linux

  1. Open up a command terminal (as root or do step 2 or 3 below with sudo).
  2. For Linux running the nscd (Name Service Cache Daemon), run the command /etc/init.d/nscd restart.
  3. For Linux running the named DNS Daemon, run the command /etc/init.d/named restart.

Mac OS X 10.5.1 "Leopard" or below

  1. Open a command terminal.
  2. Run the command sudo lookupd -flushcache.

Mac OS X 10.6 "Snow Leopard"

  1. Open a command terminal.
  2. Run the command sudo dscacheutil -flushcache.

Mac OS X 10.7 "Lion" and 10.8 "Mountain Lion"

  1. Open a command terminal.
  2. Run the command sudo killall -HUP mDNSResponder.

Mac OS X 10.9 "Mavericks"

  1. Open a command terminal.
  2. Run the command dscacheutil -flushcache.
  3. To reload the DNS, run the command sudo killall -HUP mDNSResponder.

Mac OS X 10.10 "Yosemite"

  1. Open a command terminal.
  2. Run the command sudo discoveryutil udnsflushcaches.

That's it.

Bonus: Have a look at our list of Top 10 Public DNS Servers.

Comments (0)
Featured Articles