Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've consistently had a problem where "ipconfig /flushdns" + restarting computer doesn't get rid of all the DNS records.

Should it completely flush any and all records in DNS?
Why doesn't it usually happen like this?
Is there some kind of restriction?

share|improve this question
You have some good answers to your hypothetical question. What problem are you trying to overcome? – dbasnett Jul 25 '13 at 15:03
The "success" report of /flushdns is "hardcoded", It just always reports success. If it is launched with Admin rights (right click) then it works. Without launching it as admin (even if you are logged in as admin) it just fails and reports success. I wonder if asking to burn some microsoft developers slowly on a stick would be political incorrect ? – John Apr 5 at 1:16

2 Answers 2

up vote 11 down vote accepted

If one asked "why do some entries remain in ipconfig /displaydns even after I have flushed them with /flushdns?", it would have several possible answers:

  1. A program is repeatedly resolving some domain, so its information gets cached almost immediately again.
  2. The DNS Resolver has the handling of some special names hardcoded (such as localhost).
  3. The DNS Resolver automatically reads your /etc/hosts (actually %SystemRoot%\system32\drivers\etc\hosts) and uses it to fill the Resolver cache so that these names wouldn't have to be actually looked up on DNS. It's a nice trick to avoid re-reading /etc/hosts every time a name has to be resolved.

If one asked "why, after I change something in my domain and run /flushdns, I still don't see my changes?"

It is physically impossible to flush all records in DNS, because DNS – the Domain Name System – is hosted on many servers over the entire Internet, and you would have to destroy all of them.

What ipconfig accesses is your computer's local cache of information looked up from DNS; if you flush the cache on your computer and try to access any domain, the computer has to ask the configured DNS server again.

However, the configured DNS server, be it your router's, your ISP's, or a public one (e.g. Google's), has its own cache. Once someone asks the DNS server at about the domain, it gets cached on that server as well. So in many cases there might be three, maybe even four, layers of caching: in Windows, in your router/modem/gateway, at your ISP, and maybe a second layer deeper at the ISP.

share|improve this answer
So then by releasing your ip ipconfig /release and ipconfig /renew you're essentially getting a new IP assigned that other DNS servers do not recognize? – Howdy_McGee Jul 25 '13 at 18:01
@Howdy_McGee: These two commands have no relation at all to the ones explained above. They do not do anything to DNS; they work with DHCP – /release "returns" the current IP address lease, and /renew tries to extend the current one – or requests a new one, possibly with a different IP address or with different DNS server settings, but it's up to the router what address it issues a lease for. – grawity Jul 25 '13 at 18:48
There may be yet another hidden location for old ip-numbers. 1. I flushed the DNS using admin rights. 2. nslookup gives me the new ip-number. 3. I verified the host is not in the hosts file. 4. ping still connects to the old ip! Where is this old setting hiding? ipconfig /all shows there is more than 1 DNS server. In my case the old ip-number is hiding on the 2nd DNS server: ping apparantly uses the DNS server with the old ip-number and nslookup by default apparently uses the DNS that has the new ip number. – anneb Oct 20 at 9:56

Any A (host) records will be re-added to your cache upon restarting your machine.

Stopping and starting the dnscache will not change this either. Some Host records will automatically repopulate.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.