Most major operating systems will cache DNS results for specific domains to greatly enhance DNS lookup times. Occasionally, an OS will cache bad results which will in cause incorrect content to be returned or not return anything at all. Luckily most operating systems offer a way to flush DNS, which clears bad records. Below is a list of specific instructions for clearing the DNS cache on most operating systems:
Apple OS X
Flushing the DNS in Mac OS X is an easy process, however, steps vary depending on the version of OS X being used.
macOS Sierra
If you are running Mac OS X 10.12, you need to take the following steps:
- Open up the command terminal.
- Run the command
sudo killall -HUP mDNSResponder
Mac OS X El Capitan
If you are running Mac OS X 10.11, you need to take the following steps:
- Open up the command terminal.
- Run the command
sudo killall -HUP mDNSResponder
Mac OS X Yosemite
If you are running Mac OS X 10.10, you need to take the following steps:
- Open up the command terminal.
- Run the command
sudo discoveryutil udnsflushcaches
Mac OS X Mavericks
If you are running Mac OS X 10.9, you need to take the following steps:
- Open up the command terminal.
- Run the command
sudo killall -HUP mDNSResponder
Mac OS X Mountain Lion
If you are running Mac OS X 10.8, you need to take the following steps:
- Open up the command terminal.
- Run the command
sudo killall -HUP mDNSResponder
Mac OS X Lion
If you are running Mac OS X 10.7, you need to take the following steps:
- Open up the command terminal.
- Run the command
sudo killall -HUP mDNSResponder
Mac OS X Snow Leopard
If you are running Mac OS X 10.6, you need to take the following steps:
- Open up a command terminal.
- Run the command
sudo dscacheutil -flushcache
Mac OS X Leopard and below
If you are running Mac OS X 10.5.1 or below, you need to take the following steps:
- Open a command terminal.
- Run the command
sudo lookupd -flushcache
Microsoft Windows
Windows 10
Due to system security permissions, you must ensure that you run the command prompt as an administrator user.
- Navigate to the Windows 10 desktop.
- Right-click on the start menu and choose
Command Prompt (Admin)
from the menu. - Type in the command
ipconfig /flushdns
Windows 8 / Windows 8.1
- Navigate to Windows 8 Start Screen.
- Type in
cmd
and the Windows search bar will appear on the right-hand side with search results. - Right-click on
Command Prompt
and clickRun as administrator
- Type in the command
ipconfig /flushdns
Windows Vista / Windows 7
- Click the start button and navigate to the command prompt (Start > All Programs > Accessories > Command Prompt)
- Make sure that you right-click on the command prompt application and choose "Run as Administrator"
- Type in the command
ipconfig /flushdns
Linux
If you are running the nscd Name Service Cache Daemon and wish to flush your DNS cache, then you will need to do the following:
- Open up a command terminal (either as root or run step 2 with
sudo
). - Run the command
/etc/init.d/nscd restart