DNS (Domain Name System) on Windows 11 is a system that translates domain names, such as www.example.com, into IP addresses, such as 192.0.2.1, that computers can use to communicate with each other over the internet or a local network.
When you type a URL into your web browser or try to connect to a network resource, your computer sends a DNS request to a DNS server to resolve the domain name into an IP address. The DNS server then responds with the corresponding IP address, allowing your computer to establish a connection to the desired resource.
Windows 11, like other operating systems, has built-in DNS client software that communicates with DNS servers to resolve domain names. Additionally, Windows 11 allows you to configure DNS settings, such as preferred DNS servers and DNS suffixes, to control how your computer resolves domain names.
Now, let’s take a look at the different methods by which you can flush this DNS cache on Windows 11.
Method 1: Using Command Prompt (CMD)
Open the Command Prompt. For this, press the Start button first. Then type CMD to search for the command prompt. Now, click Run as administrator once you see it.

Now, type the following command:
ipconfig /flushdns

Now hit the enter key to run the command.
You will now get a confirmation message that the DNS resolver cache has been flushed.

Method 2: Using PowerShell
Another way to flush the DNS cache on Windows 11 is to use PowerShell. Here’s how to do so:
Press Start, type PowerShell, and click on Run as administrator.

Now, type the following command:
Clear-DnsClientCache

Now hit the enter key to run the command.
And that’s it! This will clear your DNS cache instantly.
Method 3: Using RUN
You can also clear DNS cache straight from the RUN window without having to open any command terminal. Many people find this method much more convenient than the previous two options. Here’s how to do so:
Press Win + R
to open the RUN box. Now, simply type the following command:
ipconfig /flushdns

Now hit the enter key to run the command.
You will see a command window for a split second and your DNS cache will be flushed.
Method 4: Using a Batch file
If you plan to clear your DNS cache every so often, an easier way is to create a batch file that you can run by simply double-clicking on it. This is how to go about it:
Press Start, type Notepad, and hit Enter.

Then type the following in the text document:
ipconfig /flushdns

Then click on File in the top left corner.

Select Save as.

Click on the ‘Save as type’ drop-down menu and choose All files.

Give your batch file a name and replace the .txt file extension with .bat.

Click on Save.

Now, anytime you need to clear the DNS cache, simply double-click on this batch file.

Method 5: Clear DNS in Chrome and Edge
Certain applications like Google Chrome and Microsoft Edge keep their own DNS cache stored away to improve search speeds. This DNS cache is different from the one that is stored by Windows and will have to be cleared separately. Here’s how to go about clearing it on Chrome and Edge:
In Chrome
Open the Google Chrome application. Then enter the following in Chrome’s address bar:
chrome://net-internals/#dns

Then hit Enter. This will lead you to Chrome’s ‘net internals’ page. Click on Clear host cache next to ‘Host resolver cache’.

For Edge
If you’re a Microsoft Edge user, enter the following in the address bar:
edge://net-internals/#dns

Then hit Enter. This will lead you to Edge’s ‘net internals’ page. Here, as before, click on Clear host cache.

And just like that, you will have cleared the DNS cache on Chrome and Microsoft Edge.
Method 6: Reset Winsock Settings
If the aforementioned methods do not work for some reason, you can resort to resetting Winsock Settings. Winsock is used to communicate between Windows network software and network services and resetting it is tantamount to clearing the DNS cache as well. Here’s how to go about it:
Press Start, type cmd, then right-click on the best-matched result and select Run as administrator.

Now type the following command:
netsh winsock reset

Then hit Enter. If Winsock was reset successfully, you’ll get a message about the same.

Then restart your computer to complete the reset.
Method 7: Refresh DNS Cache automatically every day
There is a registry modification hack that can help you reset and refresh the DNS cache every 24 hours. Once set up, the reset will occur automatically. Here’s how to go about it:
Press Start, type regedit, and hit Enter.

Now navigate to the following address in the Registry Editor:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters
Alternatively, copy the above and paste it into the registry editor’s address bar, like so:

Then hit Enter. Now, right-click on empty space on the right, select New, then select DWORD (32-bit) Value.

Name it MaxCacheTtl. Then double-click on it to modify it.

Enter 86400 under ‘Value Data’.

Then click OK.

Next, right-click on empty space again, and create a new DWORD (32-bit) Value.

Name it MaxNegativeCacheTtl. Then double-click on it to modify it.

Set the ‘Value Data’ to 5.

Then click OK.

Then restart your PC for good measure. From now, your DNS cache will reset automatically after every 86400 seconds, or 24 hours.
How to view the current DNS cache
If you’re the curious type and want to know what’s held within your DNS cache currently, here’s how you can view it:
Press the Start button on your keyboard and then type cmd and then click Run as administrator.

Now, type the following command:
ipconfig /displaydns

Now hit the enter key to run the command.
This will display your current DNS cache data.

Reset DNS Cache
It is often the case that DNS will fail to respond to repeated queries and cache-clearing commands. In such cases, restarting the DNS client may be required. This can be done in a couple of ways:
Disable and Enable DNS Cache from the Command Prompt
Press Start, type cmd, right-click on the best-matched result and select Run as administrator.

Now type the following command:
net stop dnscache

Hit Enter. This will disable DNS cache. Now, type the following command to re-enable it:
net start dnscache

Then hit Enter. Your DNS cache should now reset. If you get the error message saying that ‘the requested pause, continue, or stop is not valid for this service’, refer to the FIX given below.
From the Services app
Another way to reset DNS cache is to do so from the Windows Services app. Here’s how to go about it:
Press Start, type services, and hit Enter.

Then look for DNS Client.

Right-click on it and select Restart.
Wait for the DNS client service to restart. Once it does, you can resume browsing or clearing the DNS cache using the methods listed above.
If the option to Start, Stop, or Restart are greyed out, refer to the FIX given below as a workaround.
FIX: Cannot restart DNS Client. The requested pause, continue, or stop is not valid for this service
If you get an error message saying that “the requested pause, continue, or stop is not valid for this service”, and are also unable to restart the DNS service from the Services app, then you have to dig a little deeper into the registry to restart the DNS client service. Here’s how to do so:
Open the Registry Editor as shown before. Then navigate to the following address:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache
Alternatively, copy the above and paste it into the registry editor’s address bar.

Then hit Enter. Now, double-click on Start on the right to modify it.

Set its value to 4.

Then click OK.

Restart your computer for the DNS service to stop. Then, to re-enable it, change the value to 3.

If you wish to revert the changes, simply set the value to 2, which leads to automatic configuration at startup.
Why flush DNS cache on your Windows 11?
Apart from the obvious benefit of having a relevant website cache and speedy internet navigation, there are two other important reasons why you should flush your DNS cache from time to time. The first is privacy. Sure, DNS doesn’t store information the way your browser cookies do. But it does contain information about the websites that you’ve visited recently and those that you visit regularly. This means that if someone gets access to your DNS cache, your privacy could be compromised.
The other reason is basic security. If cybercriminals get access to your DNS cache, they can change the IP addresses of websites stored there and even insert new ones. Also called DNS poisoning, this can be quite a security problem. If cybercriminals can redirect you to another website, they can gather your sensitive data such as passwords to your accounts and credit card information.
Clearing the DNS cache will ensure that all the irrelevant and obsolete information about websites is removed, and your internet browsing remains secure.
Why flush DNS cache on your Windows 11?
Apart from the obvious benefit of having a relevant website cache and speedy internet navigation, there are two other important reasons why you should flush your DNS cache from time to time. The first is privacy. Sure, DNS doesn’t store information the way your browser cookies do. But it does contain information about the websites that you’ve visited recently and those that you visit regularly. This means that if someone gets access to your DNS cache, your privacy could be compromised.
The other reason is basic security. If cybercriminals get access to your DNS cache, they can change the IP addresses of websites stored there and even insert new ones. Also called DNS poisoning, this can be quite a security problem. If cybercriminals can redirect you to another website, they can gather your sensitive data such as passwords to your accounts and credit card information.
Clearing the DNS cache will ensure that all the irrelevant and obsolete information about websites is removed, and your internet browsing remains secure.
Leave a Comment