How to Clear Windows DNS Cache (Server & Workstations)
Having DNS resolution problems? Do you need to clear the DNS cache on a Windows 10 computer or Server?
Then you’re in the right place.
In this post, I’ll show you how to quickly clear the DNS cache using the command line, Windows Server DNS console and PowerShell.
Clear DNS Cache on Windows 10
This also works on older Windows operating systems.
Step 1: Open command prompt
Click the Windows start button and type cmd
Click on Command Prompt to open
Step 2: Enter the following command
With command prompt open type:
ipconfig/flushdns
That’s it for flushing the local cache. If you want to check the local cache then move on to step 3.
Step 3: View DNS Resolver cache (Optional)
This is another simple command just type:
ipconfig /displaydns
This will display all the local cache entries.
RECOMMENDED: SOLARWINDS IP ADDRESS TRACKER (FREE TOOL)
Scan, detect and easily manage IP addresses with the Free IP address tracker by SolarWinds. By using this FREE tool you can save time by eliminating the need to manually track IP address information.
In addition, it helps to detect IP conflicts on your subnet. Download your FREE copy of IP Address Tracker.
Clear DNS Cache on Windows DNS Server
Maybe it’s not a local client issue, maybe your server has a bad cache entry. Follow these steps to clear the cache on your Windows Server.
In this example, I’m using Windows Server 2016.
This is super easy, just open the DNS console, right-click the DNS server and select clear cache
Clear DNS Cache Using PowerShell
To clear the client cache using PowerShell use this command:
Clear-DnsClientCache
To clear the local DNS server cache use this command:
Clear-DNsServerCache
To clear the DNS cache on a specific DNS server use this command. Change -ComputerName to the name of the server you want to clear
Clear-DnsServerCache –ComputerName “DC1” -Force
If you still have DNS issues then check out my guide on using nslookup to test DNS, it includes 8 tips for troubleshooting DNS problems.
Leave a comment below
Related: Understanding Windows DNS Zones