DNS resolves domain names to IP addresses so people don't have to remember a series of numbers (IP addresses) when navigating to a website. In order to speed up requests and reduce queries to DNS servers, most operating systems cache (temporarily save) DNS lookups locally. If you need to clear that cache (in  order to see changes, this article will walk you through how to do that for these different operating systems: Windows, MacOS, and Linux. The process is generally referred to as clearing or flushing local DNS cache.

Clearing Local DNS Cache in Windows

Bring up a command line window, depending on your version of Windows, this will be done in one of the following ways:

  • Windows 7 and Vista: 
    • Click on the Start Menu 
    • Type cmd in the search box 
    • Right click on cmd in the Programs search result and choose Run as administrator
  • Windows 98/NT/2000/XP 
    • Click on the Start Menu 
    • Select run 
    • Type or select cmd to open the command line window
Once you have the command line window open, type this command and hit Enter:

ipconfig /flushdns

After flushdns is complete, type exit to close the window

Clearing Local DNS Cache in MacOS

10.4 and below

  • Open a Terminal window
  • Type this command and hit Return:
  • lookupd -flushcache
  • Close the Terminal window

10.5 and above

  • Open a Terminal window
  • Type this command and hit Return:
  • dscacheutil -flushcache
  • Close the Terminal window

Clearing Local DNS Cache in Linux 

With the various distributions of Linux, you will find that by some run a daemon in the background to manage DNS cache, while others do not. Ubuntu is a good example of a distribution that doesn't run this daemon by default. If you're running Ubuntu and you have not already installed the ncsd daemon, you can install it with this command:

sudo aptitude install nscd

To restart the ncsd deamon in Linux, use this command:

sudo /etc/init.d/networking restart

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Help Center:
Email Address
Optional, but our team may contact you for more information.
Did you find this article helpful?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

Update to SSL Certificates - Certificate Warnings
1969-12-31 11:00 am EST
Hits: 710

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.