DNS request are cached by your operating system to speed up lookups. If you need to clear DNS cache for some reason(like testing your blog in a new host), you need to know the correct commands to be entered in the command prompt / terminal. We had shared the command to clear DNS cache in Mac OS X, here is the simple command line shortcut to do it in Windows.
In Windows 7 and Vista
- Hit Windows key and type in cmd (do not hit enter).
- In the search results that come up, right click “cmd” and run as administrator. When the screen flashes and asks for permission, accept it.
- In the command prompt, type in ipconfig /flushdns (or right click and paste it to the command prompt) and hit return.
- You should see the confirmation as shown below:
In Windows XP
- Hit Windows+R to bring up the Run dialog box.
- Type cmd and hit ok.
- In the command prompt that comes up, enter ipconfig /flushdns and hit return.
I tried to clear the dns, got the following message. Any idea on how should I proceed?
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>ipconfig/flushdns
Windows IP Configuration
Could not flush the DNS Resolver Cache: Function failed during execution.
C:\Documents and Settings\Administrator>
it did not work. the files were not deleted.
THANK It Worked
run ipconfig /flushdns— I get the successfully flushed the DNS resolver cache but whe I rerun the ipconfig /displaydns command, the files are still there. Why?
Actually you can add another command call “registerdns” to query the DNS server after your flush.