Introduction
This document describes how to flush or clear the DNS cache on computers and servers.
Background Information
The commands need to be run at the command prompt with administrator privileges.
Please add any additions, corrections, updates or suggestions to the comments on this article to better help the community.
Clear the DNS Cache on a Computer
Follow the instructions for your operating system.
Windows 7 and Earlier
- Click the Start Menu.
- Navigate to All Programs.
- Choose Accessories and right-click Command Prompt.
- Choose Run as Administrator.
- Run this command in the command line and then press enter:
ipconfig /flushdns
Windows 8
- Windows Key or hover your mouse over the bottom left corner and click the Windows Icon.
- Type Command Prompt.
- Right-click the application and select Run as Administrator
- Run this command in the command line and then press enter:
ipconfig /flushdns
OS X 10.4 Tiger
- Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal.
- Run this command in the command line and then press enter:
lookupd -flushcache
OS X 10.5 and 10.6 Leopard
- Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal.
- Run this command in the command line and press enter:
dscacheutil -flushcache
OS X 10.7 and 10.8 Lion
- Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal.
sudo killall -HUP mDNSResponder
OS X 10.9 and 10.10
- Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal.
dscacheutil -flushcache;sudo killall -HUP mDNSResponder
Linux (Most Distributions)
-
sudo /etc/init.d/nscd restart
or
sudo /etc/init.d/nscd restart
Ubuntu Linux
- Open a terminal window.
- Run this command in the command line and then press enter:
sudo service network-manager restart
Clear the DNS Cache on Browsers
If you have recently set up your filtering, or just changed a setting, a cache clear can be necessary before you see your filtering take effect.
This table provides instructions for clearing the DNS cache within common Internet browsers.
Browser
|
Steps to clear the DNS Cache
|
Internet Explorer 8 and Higher (Windows)
|
- Navigate to the History menu, select Delete Browsing History, check all boxes (except passwords if desired), and click Delete.
|
Mozilla Firefox (Windows)
|
- Click Firefox at the top left of your browser, navigate to the History menu, select Clear Recent History and check all boxes.
- Under Time range to clear select Everything (except passwords if desired) and click Clear Now.
|
Apple Safari (Windows)
|
- Expand the Cog Icon in the upper right corner and select Reset Safari.
- Check all boxes and click Reset.
|
Apple Safari (Windows)
|
- Go to the Safari menu, select Reset Safari, check all boxes and click Reset.
|
Google Chrome (Windows)
|
- Expand the Wrench Icon in the upper right corner and select History and check all boxes.
- Under Clear data for this time period, select Everything (except passwords, if desired) and click Clear Browsing Data.
|
Google Chrome (Mac)
|
- Go to the Chrome menu, select Clear Browsing Data and check all boxes (except passwords if desired).
- Under Clear data for this time period, select Everything, and click Clear Browsing Data.
|