How to disable the caching of failed DNS lookups

Version: 4.32
Revision: 46 Build 78


How to disable the caching of failed DNS lookups

Windows OS: XP pro, XP home, 2003 and Media Center 2005.

Introduction: Windows 2000/XP/2003 has integrated ability to “cache DNS lookup” ~results in the client’s cache. The cache configuration can be viewed by typing: “ipconfig /displaydns” in the command prompt.

1.] To start command prompt, click Start >> Run >> Type: CMD [cmd]

Code: ipconfig /displaydns

Notes: You can also copy the “Cache DNS” results to your computer.

Type: ipconfig /displaydns >c:\dnscache.txt

2.] You can also manually clean the system cache, by entering this code to the command prompt: ipconfig /flushdns

Code: ipconfig /flushdns

Tips: In order to avoid caching any negative DNS lookup ~results, you can change a string within the registry application.

a.] Open Registry Editor.

Click Start >> Run >> Type: Regedit

b.] In Registry Editor, navigate to the following registry key…

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters

c.] Create the following value (DWORD): NegativeCacheTime

d.] Give it a value of 0 [zero].

e.] Close Registry Editor and reboot your computer.

Notes: Before using the registry, please backup your registry.

Alternative solution: to make thing easier, you can use this “registry script”. But, you’ll need to save this source code as a “.reg” extension.
After that, just execute the script and reboot your computer.

—Copy Source Code—

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters]
"NegativeCacheTime"=dword:00000000
"NetFailureCacheTime"=dword:00000000
"NegativeSOACacheTime"=dword:00000000

—End Source Code—

Comments are closed.