Disabling Caching of Failed DNS Lookups

Written by Jenny on Monday, March 3, 2008 7:29 - 0 Comments

How to prevent caching of failed DNS lookups from preventing you from having DNS name queries resolved.

When Microsoft Windows platforms try and resolve a DNS name against a name server, the result is cached regardless of whether the query is successful or fails. For example, if you mistype an URL into the address bar of Internet Explorer and press Enter, your ISP’s name server will return a result indicating that the query failed. If you try again and mistype the URL again, you’ll naturally get the same result but faster since the URL is now being resolved from your computer’s DNS cache.

But what if you typed the URL correctly but the name server cannot resolve it due to a transient server problem? In that case, the negative response is cached and any attempts you make to open the URL fail until the failed name lookup expires from your DNS cache. So even if the name server becomes available and can resolve name queries, your computer won’t actually send the query for the URL until the cache entry for it expires.

There are several workarounds you can try to resolve this:

1. Boot your computer (clears the cache). Obviously not the best solution.

2. Open a command prompt and type ipconfig /flushdns to clear the cache. Works fine but it’s clearly a workaround not a solution.

3. Open Registry Editor and go to the following key:

HKLMSYSTEMCurrentControlSetServicesDnscacheParameters

Then create the following three DWORD values and set them each to zero:

NegativeCacheTime
NetFailureCacheTime
NegativeSOACacheTime
The only negative effect from this tweak is that if you repeatedly type the wrong URL for a site, you’ll get slower failed responses as they all come from the name server and not your cache. But the response delay itself should tell you that you’re typing the URL wrong anyway.

As usual use caution when editing the Registry and back it up first before making changes.

Article written by MyComputerAid.com

Related posts:

  1. Understanding the DNS Resolver Host File
  2. When to use and not use universal group membership caching
  3. Find All Locked-Out Accounts
  4. Find All Locked-Out Accounts
  5. Troubleshooting Universal Group Caching
  6. Troubleshooting Universal Group Caching
  7. Finding Out Why a Service Won’t Start
  8. Starting named: /etc/named.conf:6: change directory to ‘/var/named’ failed: file not found
  9. Clearning the cache in Mozilla firefox
  10. Howto optimize wordpress



Leave a Reply

You must be logged in to post a comment.

2003 server - Sep 30, 2008 22:34 - 0 Comments

instant messaging srv records

More In Computers & PC


Microsoft Outlook - Mar 22, 2009 11:22 - 0 Comments

Outlook: Duplicates in Mailbox

More In Computers & PC