Jan 182008
 


When you visit a website, Windows 2000/XP/2003/Vista tries to speed things up by placing the DNS information about that site, into a DNS cache on your PC.

You see the DNS Windows 2000/XP/2003/Vista cache stores BOTH negative and positive entries. The positive entries are those that the DNS lookup was successful and you could connect to the website.

Negative entries are those where the DNS lookup failed and you could not connect to the website.

A problem can arise here because if the DNS cache hold a negative entry and the website you want to view is now OK to view, Windows XP will still give you a DNS error!

Flush DNS

First of all you need to flush the local DNS cache with the following command in a command prompt

c:> ipconfig /flushdns

Block Negative Entries

If you want to block cache Negative Entries in Windows XP you need to add a new DWORD to the following Registry key

Note :- Before doing any changes to the registry please take a backup of your registry

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters

DWORD: MaxNegativeCacheTtl

Value: 0

This will now ensure NO negative entries are stored in your windows xp machine.Hope fully it will work for windows 2000/2003/Vista

Incoming search terms:

  7 Responses to “How to Clear/Flush DNS Cache in Windows 2000/XP/2003/Vista”

  1. Thanks For That On The “ipconfig /flushdns” / Ive seached everywhere to clear my cache!

  2. I’ve tried this to no avail. It reports “failed to flush DNS cache”. ANy suggestions?

  3. Same problem… ipconfig/flushdns and ipconfig/displaydns neither one work and cannot connect to the internet… windows connection detection says something about the firewall and the firewall is disabled.. the internet worked just fine yesterday and all I did was turn it on today only to find it won’t connect to http https and ftp

  4. Hello everybody, , i have DSL connection 1mbps and my isp router which is connected with my wifi linksys router (cascaded router) … my laptop is connected wirelessly with linksys router while my desktop pc which i bought 3 days ago is connected through ethernet cable with linksys router, my this configuration was working perfect untill yesterday and i was able to access the internet on my desktop pc without any problem but today in the morning as i turned on my pc my pc was connected to the router but there was no internet activity..i tried repairing the connection but got error unable to clear dns cache then i tried this command ipconfig /flushdns but it got failed too then i tried this command in cmd REG ADD HKLM\\SYSTEM\\CurrentControlSet\\Services\\Dnscache /V Start /T REG_DWORD /F /D 2
    and i checked my dns client service was running and fine….everything is fine but still my internet connectivity is not working ..even though after running the above command i tried repairing my connection and im not getting dns error anymore but still internet connectivity is not working…any reason? is it because i updated my windows last night? sp3 is the source of problem ?any reply will highly be appreciated, thanks in advanced and yes my NIC card is working fine since im connected to linksys router via ethernet cable 100mbs

  5. try /ipconfig /all /dnsflush
    should work just fine afterwards.

  6. For those of you running Windows Vista, to get this method to work, you need to run the command prompt menu as an administrator. You do this by right clicking on the command prompt icon, and then selecting “Run as Administrator” from the list. Then just follow the steps in the article above, and it will take care of the problem.

  7. Does anyone have the VBS code to make this happen by using a macro in Excel please ?

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>