Categories

Archives

How to Flush Your Local DNS

In this article, Joe Russell explains how to flush your local dns

Why?

DNS is used to translate a domain name into an ip address.  As a webmaster you will probably change multiple settings within your DNS server while configuring your web sites.  Whenever your OS needs to lookup a domain, it contacts a remote DNS server and then caches the results locally to save time.  This is usually not a problem because DNS entries normally expire within a day and an update is not needed before then.  When you are changing DNS entries on your own website, you will probably need to flush your DNS cache to obtain the new record.

How-To

The process of clearing or “flushing” your local DNS cache is different depending on your OS.  I will go thru the process on Windows and Mac.

Windows

  1. (Windows Key) + R (should open a run dialog box)
  2. Type in cmd
  3. Press enter or click OK
  4. Type ipconfig /flushdns

NOTE: If you are running Windows Vista, you will have to open the command prompt as an administrator.

Mac OS/X

  • Leopard: dscacheutil -flushcache
  • Pre-Leopard: lookupd -flushcache

Notes:

  • Even after flushing your local cache you may have to wait up to an hour for your DNS server to update.  You will have to clear your cache after your DNS server has updated to get your new record.
  • If you run Linux, your distro may or may not have a local DNS cache.  If your distro does cache DNS locally, you may flush it by restarting the service (sudo /etc/init.d/nscd restart).

1 comment to How to Flush Your Local DNS

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>