To reduce the load on the network and the device, a caching mechanism on the local Windows service - Dnscache - was implemented during DNS queries. It allows to record already made resolves to reduce the number of network packets and speed up the work process.
But often the network and its addressing can change and the infrastructure can be modified, so outdated records can generate an incorrect request.
How do I quickly clear and query new DNS records?
Open Terminal or invoke the context menu with the Win+X shortcut and select PowerShell. You can then view the existing cache for more detailed information:
And reset it by entering the flush DNS command, where all records will be cleared already:
The machine will recheck its local host list, and if it finds nothing, it will contact the servers specified in the network settings. After that it will update the list of entries.
How do I disable the Windows DNS cache service?
If caching is not working correctly, you can always disable it:
But if you change your mind, you can switch the network service back on with a similar command:
However, if you don't need to keep records for so long, and you still need caching. What to do then?
How do you configure the DNS records cache retention time?
Almost all Windows settings and configurations are in the registry, there you can also configure the Dns cache service by the path:
Beforehand, let's open the registry using the Win+R key combination and enter regedit in the search. Create or fix the attribute MaxCacheTtl of DWORD type to the value 360. This means that the records will be cached for 360 seconds and then reset, in order for the settings to take effect it is necessary to reboot the device. In that tutorial, we can see a clear DNS command that is used to remove the DNS cache.
If you don't have sufficient resources than you can perform actions on powerful cloud servers. Serverspace provides isolated VPS / VDS servers for common and virtualize usage.