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
·
6740 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
- Open an Elevated Command Prompt.
- Type in ipconfig /flushdns, then Enter.
Windows 98/NT/2000/XP
- Open a Command Prompt by pressing Start > Run > cmd.exe > OK.
- Type in ipconfig /flushdns, then Enter.
Linux
- Open up a command terminal (as root or do step 2 or 3 below with sudo).
- For Linux running the nscd (Name Service Cache Daemon), run the command /etc/init.d/nscd restart.
- For Linux running the named DNS Daemon, run the command /etc/init.d/named restart.
Mac OS X 10.5.1 "Leopard" or below
- Open a command terminal.
- Run the command sudo lookupd -flushcache.
Mac OS X 10.6 "Snow Leopard"
- Open a command terminal.
- Run the command sudo dscacheutil -flushcache.
Mac OS X 10.7 "Lion" and 10.8 "Mountain Lion"
- Open a command terminal.
- Run the command sudo killall -HUP mDNSResponder.
Mac OS X 10.9 "Mavericks"
- Open a command terminal.
- Run the command dscacheutil -flushcache.
- To reload the DNS, run the command sudo killall -HUP mDNSResponder.
Mac OS X 10.10 "Yosemite"
- Open a command terminal.
- Run the command sudo discoveryutil udnsflushcaches.
That's it.
Bonus: Have a look at our list of Top 10 Public DNS Servers.
Comments (0)
Stay Connected
Follow us to get the latest tech tutorials, news, and giveaways as soon as we post them.
Have a Tech Question or News Tip?
Featured Articles