DNS Cache automatically stores IP addresses and other DNS results for websites you visit, this is done to speed up subsequent requests to the same hostname or domain. Sometimes this becomes a issue when your local DNS resolvers cache a domain name to an IP and when you try to go to the domain, it pulls up the domain from the OLD IP Address (cached locally on your computer) instead of querying for a new IP and finding the correct record.
This article will guide on how to flush your DNS cache records.
Microsoft Windows 8
- Close the application you're currently working with, such as an internet browser or email client.
- Press the Windows Logo + R keys together simultaneously. This will cause the Run dialogue window to appear.
- Type cmd in the text box and select OK.
- When the black screen appears, type the following command and hit enter:
ipconfig /flushdns - Restart your application (browser or email client).
Microsoft Windows Vista and Windows 7
- Close the application you're currently working with, such as an internet browser or email client.
- Click the Start orb and follow All Programs > Accessories, look for Command Prompt.
- Right click on Command Prompt and select "Run as Administrator".
- When the black screen appears, type the following command and hit enter:
ipconfig /flushdns - Restart your application (browser or email client).
Microsoft Windows XP
- Close the application you're currently working with, such as an internet browser or email client.
- Go to the Start menu and click Run.
- Type cmd in the text box and select OK.
- When the black screen appears, type the following command and hit enter:
ipconfig /flushdns - Restart your application (browser or email client).
Mac OS X
- Close the application you're currently working with, such as an internet browser or email client.
- Navigate to your Applications folder.
- Open Utilities and double click on Terminal.
- Type the following command and hit enter:
sudo killall -HUP mDNSResponderThis command should work on Mac OS X 10.5 (Leopard), 10.6 (Snow Leopard) and 10.7 (Lion). If the above command is not available, you can try the other flush DNS command as follows which should work on Mac OS X 10.4 (Tiger):
sudo dscacheutil -flushcache - Restart your application (browser or email client).
Don't worry if either command says something like "Not found", and continue to restart your application.
Linux
Note: Different distributions and versions of Linux may have slightly different commands due to differences in configuration. One of the commands below will probably work.
- Open up a root terminal window (Ctrl+T in Gnome).
- Type the following command and hit enter:
/etc/init.d/nscd restartYou may need to use sudo depending on your installation instead:
sudo /etc/init.d/nscd restartSome distributions support this command:
sudo /etc/init.d/dns-clean startOr support this command:
sudo service nscd restartSome installations may have NSDS located in another directory, like the following example. You may need to locate where it is installed to be able to execute the correct command.
/etc/rc.d/init.d/nscd restart - Restart your application (browser or email client).