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.

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: Permissions Analyzer for Active Directory

This FREE tool lets you get instant visibility into user and group permissions and allows you to quickly check user or group permissions for files, network, and folder shares.

You can analyze user permissions based on an individual user or group membership.

This is a Free tool, download your copy here.

Leave a Comment