How to Fix Could not Flush the DNS Resolver Cache

The ipconfig tool that is built-in to the Windows operating system is very useful for administrators to display all TCP/IP network configurations. It can also be used to test the computer’s connectivity between the DHCP server and the workstation by using the /release and /renew command line options. Most normal computer users don’t really need to use this tool but there is actually a very useful command line option which is the “flushdns“.

The ipconfig tool describes the flushdns option as purging the DNS resolver cache. By default every Windows computer is configured to automatically cache name queries resolution because the IP address attached to a domain name doesn’t normally change very often. Hence caching the DNS will save a little bit of your bandwidth and time by not having to check with a DNS server every time you visit a website.

The flushdns command line option in ipconfig merely clears the DNS cache on your computer. This is particularly useful when a website’s IP address has changed and you’re still hitting on the old one because the DNS cache for the domain name hasn’t expired.

Flushing your computer’s local DNS cache can be done by typing the command below in command prompt.

ipconfig /flushdns

It is possible that you’re getting an error message “Could not flush the DNS Resolver Cache: Function failed during execution” after typing the command above.

could not flush the dns resolver cache

This problem is most likely caused by a service called DNS Client being disabled on the computer which by default is automatically started with Windows. To re-enable the DNS Client service:

1. Press WIN+R to bring up the Run dialog box.

2. Type services.msc in Run and click OK.

3. Look for DNS Client in the name column and double click on it.

4. If the startup type is disabled, simply click on the drop down menu and select Automatic. Click Apply and followed by clicking on the Start button. Alternatively you can also reboot your computer and the DNS Client service will automatically start by itself.

start dns client

If you are having trouble following the steps above, simply download this batch file and run it as administrator. It will automatically configure DNS Client to automatically start with Windows and instantly start the service.

If for some unknown reason the DNS Client service is unable to start, any errors are logged in Event Viewer because the service runs under the Network service account. Press WIN + R, type eventvwr, click OK, expand Windows Logs > System.

"event

There is a debate whether to disable or enable the DNS Client service permanently. Some argue that disabling the DNS Service will save some memory usage making the computer faster, while enabling it will cause the websites to load faster. After a simple test, we find that the the DNS Client service uses up only 256KB of memory. So disabling it shouldn’t really give you any noticeable performance boost and it requires an additional round trip to check with the DNS servers for resolving a domain name to IP address.

Additional Tip: The resolved DNS cache can be viewed by typing the command ipconfig /displaydns. If the list is too long for the command prompt to show all the DNS cache, you can export all the results by using the greater-than sign which is >. An example command would be “ipconfig /displaydns > cached-dns.txt”.

33 Comments - Write a Comment

  1. milffox 4 years ago
  2. Ray Mears 5 years ago
  3. Kashif 6 years ago
  4. Kevin 7 years ago
  5. Vicky 7 years ago
  6. Uyl 8 years ago
    • HAL9000 8 years ago
    • CapMReynolds 6 years ago
  7. Cosmin 13 8 years ago
  8. Jose 9 years ago
  9. markfilipak 9 years ago
  10. Kris 10 years ago
  11. Hernani Gersava 11 years ago
  12. Neal K 13 years ago
  13. Debbie 13 years ago
  14. Thanks Raymond 13 years ago
  15. Varvaroushka 14 years ago
  16. hrinidhi 14 years ago
  17. Vicky 15 years ago
  18. pankaj 15 years ago
  19. vins 15 years ago
  20. manse 15 years ago
  21. kol 15 years ago
  22. Ahmed 15 years ago
  23. enli 15 years ago
  24. Ali 15 years ago
  25. richard 15 years ago
  26. Lucas 15 years ago
  27. David 15 years ago
  28. Debbie 15 years ago
  29. shettos10 15 years ago
  30. jayl 16 years ago
  31. Infest 16 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please contact us directly.