ipconfig utility is an important TCP/IP network configuration tool included by default in all Windows operating system natively. One of features of ipconfig is the ability to view and purge DNS resolver cache. Windows OS caches DNS name resolution queries so that the next same domain name DNS resolution could be plucked from local DNS cache instead of querying Internet name servers again, which takes longer route and time to resolve.

However, the internal Windows DNS Resolver cache may become corrupted or not updated, especially if a website’s IP address has recently changed. If the old IP address of the domain name entry existed in Windows DNS Resolver cache and hasn’t expired, Windows (and the web browsers on it) will continue to get the old IP address instead of the new IP address as DNS Resolver cache takes precedence of query to DNS name servers.

In such cases, the /flushdns command line option of ipconfig will come in handy. To flush and purge the Windows computer’s local DNS cache, type the following command in administrator Command Prompt window.

ipconfig /flushdns

However, the following error may occur:

Windows IP Configuration

Could not flush the DNS Resolver Cache: Function failed during execution.

Could not flush the DNS Resolver Cache: Function failed during execution

The cause for failure is most likely that DNS Client service is not running or is being disabled. The DNS Client service caches Domain Name System (DNS) names and registers the full computer name for the computer. The service is automatically started on Windows startup by default, but if it’s stopped or disabled, the flushing of DNS cache will fail.

To resolve the error, re-enable the DNS Client service:

  1. Open the Services app (via Control Panel -> Administrator Tools, Start Search or press Win + R to bring up the Run dialog box and enter services.msc).
  2. Locate and double click on DNS Client.
  3. In the drop down box of Startup type, choose Automatic.
  4. Click Apple to make the change effective.
  5. If the DNS Client service is currently stopped, highlight it and click on Start button (or right click on it and select Start on the context menu) to start the process immediately.

    Start DNS Client

In essence, when the DNS Client is not running or is disabled, the Windows does not cache the results of DNS name queries and does not register the computer’s name. All DNS name resolution queries will be forwarded to Internet DNS name servers. Thus, there is no need to issue “ipconfig /flushdns” command. If you’re facing DNS resolution issues, you should try other public DNS resolution services such as Google Public DNS (8.8.8.8 and 8.8.4.4) or OpenDNS (208.67.222.222 and 208.67.220.220).