Clear DNS Cache

Thu, Apr 9, 2009

Server

Clear DNS Cache

I have experienced some problems in the past (and still do from time to time) with opening specific sites from my computer while my internet connection is fine and other sites open without any issues.

The cause of the problem in my case is DNS cache which holds lookup values for hosts and the request times out because the cache is pointing to the incorrect location. I found that when I clear DNS cache on my Mac OS computer it solves the issue.

Most DNS requests from your computer when you open a web page, check emails and do other internet related tasks is usually cached DNS stored internally on your computer. The DNS cache is saved every now and again in order to speed up lookups to the same host(s) in the future for better performance. If you need to clear your DNS cache on Mac OS for some reason or another, you can do it with the following command.

Clear DNS Cache in Mac OS Tiger

lookupd -flushcache

Clear DNS Cache in Mac OS Leopard

dscacheutil -flushcache
, , , , , , , ,
banner-rotator-widejpg

This post was written by:

- who has written 71 posts on Lost-In-Code.

I (Antonie Potgieter) am a software engineer/web developer located in South Africa. My full-time work is the management of Tribulant Software and the development of its software packages.

Contact the author

4 Comments For This Post

  1. David Hood Says:

    If you wish to stop XP from placing negative entries into cache, you can make this change in your registry.

    1. Goto HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ Dnscache\Parameters
    2. Build a new DWORD value called NegativeCacheTime and give it a value of 0

  2. Berg Says:

    Thanks for the share Antonie and David

  3. Belajar Bisnis internet Says:

    I still dont understand about cache dns.But as i know that is to make our browsing faster isnt?.Anybody know..to explain about this.

  4. Steve Says:

    I still dont understand about cache dns.But as i know that is to make our browsing faster isnt?.Anybody know..to explain about this.

Leave a Reply