In this brief article we’ll talk about different ways on how to flush DNS cache and reset it on Windows 10 computer.
So why do you need to clean the DNS cache?
When you visit a new website, Windows tries to speed up the process of subsequent access to it. OS also automatically placing information about website’s IP address in local DNS cache.
If you use the services of medium and small Internet providers, you can periodically encounter bugs in the work of their DNS servers. Typically, this is happening due to incorrect DNS service configuration and hardware problems. At the scenario instead of the necessary sites will be issued “server not found”, at the worst one – it will start to throw at all kinds of strange sites, including phishing and malicious. And now you have changed the addresses of DNS servers and … all the same and continues. What to do? You need to flush DNS cache and that will help to update the data and fix the problem.
Also, resetting the DNS cache can be useful after changing the DNS settings on the computer or router, and also in cases when the desired site has changed the IP address to another (after moving the site to another hosting provider), and you still have the old IP in your cache and so the site just does not open.
The described method of resetting the DNS resolver cache works in all versions of Windows from Windows XP to Windows 10.
If you want to see a list of entries in local DNS cache, open elevated Command prompt and enter the following command:
For your convenience, you can redirect command very long output to text file for examing it:
ipconfig /displaydns >c:\tmp\dns_cache.txt
To reset the DNS cache and remove all entries from it, run the command:
If everything went well, the result should be “Successfully flushed the DNS Resolver Cache“. This means that cleaning the DNS cache was successful.
Another way is to perform a reset of Winsock settings. Run the command:
netsh winsock reset
Also you can restart the DNS client service to clear the cache. You can perform this task from services.msc console. Right click on DNS Client service and select Restart option.
Or from Command prompt:
net stop Dnscache && net start Dnscache
If after running the command ipconfig /flushdns you receive an error Could not flush the DNS Resolver Cache: Function failed during execution, most likely the system service “DNS client” is disabled.
Run this service or restart it (in case of errors when the service is in running state).
- How to Connect to Exchange Online Using PowerShell? - September 26, 2020
- Configuring Live Migration in Hyper-V - September 26, 2020
- RDP Error: Remote Desktop Can’t Find the Computer - September 17, 2020