How to flush DNS cache on Windows

Complete guide with multiple methods and troubleshooting for flushing DNS cache on Windows.

7-10 min read
Expert Verified
Last Updated: August 2025

Quick Answer

Flushing the DNS cache on Windows can resolve various connectivity issues by clearing outdated or corrupted DNS entries. This process can be accomplished using several methods, primarily through the Command Prompt.

Easy7-10 min read

Prerequisites & Requirements

Before flushing the DNS cache, ensure you have the following:
  • Windows 10 or Windows 11 installed on your computer.
  • Administrator access to execute commands in the Command Prompt.
  • No active VPN or proxy settings that might interfere with DNS resolution.
  • Backup any important data, as flushing the DNS cache does not affect personal files but may disrupt ongoing network connections.

Method 1: Using Command Prompt

The Command Prompt is the most common and straightforward method to flush the DNS cache. Use this method when you need a quick and effective solution.
  • Step 1: Press `Windows + S` to open the search bar. Type 'cmd' or 'Command Prompt'.
  • Step 2: Right-click on 'Command Prompt' and select 'Run as administrator'. If prompted, click 'Yes' to allow changes.
  • Step 3: In the Command Prompt window, type the command `ipconfig /flushdns` and press `Enter`.
  • Step 4: You should see a message confirming that the DNS Resolver Cache has been successfully flushed.
  • Step 5: If you do not see the confirmation message, ensure you are running Command Prompt as an administrator.

For Windows 11

Windows 11 users can follow these specific steps:
  • Step 1: Click on the Start button or press `Windows + S` to access the search bar.
  • Step 2: Type 'cmd' and select 'Run as administrator' from the right-click menu.
  • Step 3: Enter `ipconfig /flushdns` in the Command Prompt and hit `Enter`.
  • Step 4: Look for the confirmation message indicating the cache has been flushed.

For Windows 10

Windows 10 users can follow these specific steps:
  • Step 1: Click on the Start button or press `Windows + R` to open the Run dialog.
  • Step 2: Type 'cmd' and press `Ctrl + Shift + Enter` to run as administrator.
  • Step 3: Type `ipconfig /flushdns` and press `Enter`.
  • Step 4: Confirm the successful flush with the appropriate message.

Method 2: Using Windows PowerShell

PowerShell is another powerful tool that can be used to flush the DNS cache. This method is useful for users who prefer a more advanced interface.
  • Step 1: Press `Windows + X` and select 'Windows PowerShell (Admin)' from the menu.
  • Step 2: In the PowerShell window, type the command `Clear-DnsClientCache` and press `Enter`.
  • Step 3: You will not receive a confirmation message, but you can verify by using the command `Get-DnsClientCache` to check if the cache is empty.

Troubleshooting Common Issues

If you encounter issues while flushing the DNS cache, consider the following solutions:
  • Error: 'Access Denied' - Solution: Ensure you are running Command Prompt or PowerShell as an administrator.
  • Issue: 'The system cannot find the file specified' - Fix: Check for typos in the command and ensure you are using the correct syntax.
  • Problem: DNS cache not cleared - Workaround: Restart your computer to ensure all network services are refreshed.

Advanced Tips & Shortcuts

For power users, here are some additional tips and shortcuts:
  • Keyboard shortcut: `Windows + R` - Opens the Run dialog quickly for executing commands.
  • Command line: `ipconfig /displaydns` - Displays the current DNS cache entries.
  • Hidden feature: Use `ipconfig /registerdns` to refresh DNS registration for your computer.

Common Mistakes to Avoid

Avoid these common pitfalls:

Expert Tips

Flushing the DNS cache is a simple yet effective way to resolve connectivity issues and ensure your system is using the most up-to-date DNS information.