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:


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.

[fl_builder_insert_layout slug=”ad_sw_ip_address_tracker_incontent”]

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:


To clear the local DNS server cache use this command:


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

Recommended Tool: SolarWinds Server & Application Monitor

This utility was designed to Monitor Active Directory and other critical services like Azure, DNS, and DHCP. It will quickly spot domain controller issues, replication, performance issues with cloud services, failed logon attempts, and much more.

What I like best about this tool is it's easy to use interface and instant alerting features.

Download your 30-day free trial

Leave a Comment