Ever tried to open a website only to see a cryptic error, or found that a page is not updating with new content, no matter how many times you refresh? In many cases, this is not because your internet connection is bad, but your system’s DNS cache is outdated or corrupted. The fix to this problem is pretty simple. Flush and clear the DNS cache, and you are good to go. Since this is such a simple task, there are multiple ways to do it on Windows.
In this guide, I will show the steps to clear Windows DNS cache using the Command Prompt, PowerShell, and a custom ‘Flush DNS’ desktop shortcut (helpful if you are doing it multiple times as part of your troubleshooting). Let’s get started.
Quick Navigation:
- Command Prompt method
- PowerShell method
- Created a desktop shortcut to flush DNS (useful if you are doing it multiple times)
- Clear browser DNS cache (Chrome, Edge, and Firefox)
- Steps to check if DNS is cleared or not
Using Command Prompt to Clear DNS Cache
We can use the IPConfig command with the flushdns flag to quickly and easily delete the DNS cache in Command Prompt. Here’s how.
- Open the Start menu.
- Search for “Command Prompt” and click “Open“.
- Type the “ipconfig /flushdns” command and press “Enter“.
- If successful, you will see the “Successfully flushed the DNS resolver cache” message.
- Close the Command Prompt window.

Note: If you get an elevation error message, like “The requested operation requires elevation“, open the Command Prompt with admin rights and try again. To open CMD as admin, search for “Command Prompt” in the Start menu again, but this time select “Run as administrator” from the right panel.
Using PowerShell to Clear DNS Cache
If you’d like to use PowerShell, you can also flush DNS using a PowerShell-specific command. Here’s how:
- Press the “Windows key + X” shortcut.
- Select the “Terminal” or “Windows PowerShell” option.
- Type “Clear-DnsClientCache” in the Terminal/PowerShell window and press “Enter“.
- It will silently flush the DNS cache. If successful, you will not see any message.
- You can close the Terminal/PowerShell window.
Note: You can also run the “ipconfig /flushdns” command in the PowerShell window.
Important note: If you see “Access is denied” or a similar elevation error message, open the Terminal/PowerShell as admin and try again. To do that, press “Windows key + X” and select “Terminal (Admin) or “Windows PowerShell (Admin)”.
Create Custom ‘Flush DNS’ Desktop Shortcut
If you are troubleshooting your system and need to flush the DNS multiple times, running the command manually becomes tiring. To make things easier, you can create a custom desktop shortcut to clear the cache with a double-click. Here is how to set it up.
- Right-click on the desktop.
- Select “New” > “Shortcut.”
- Type the following command in the “Type the location of the item” field.
cmd /c "ipconfig /flushdns & pause" - Click “Next“.
- Type “Flush DNS” in the “Type a name for this shortcut” field.
- Click “Finish“.
- From now on, double-click the shortcut to flush Windows DNS.
Note: If you want the Command Prompt window to auto-close without waiting for a key press, use this command instead: cmd /c “ipconfig /flushdns”. All we did was remove “& pause” from the original command.
Pro Tip: Clear DNS Cache in Your Browser (Edge & Chrome)
Most don’t know this, but your browser (like Chrome, Edge, and Firefox) has its own DNS caching to make your browsing fast and reliable. If you are still facing issues even after clearing the Windows DNS cache, you should also clear your browser’s DNS cache. Here’s how to do it.
On Google Chrome
- Open the Chrome browser.
- Type “chrome://net-internals” in the address bar and press “Enter“.
- Go to the “DNS” tab on the sidebar.
- Click the “Clear host cache” button.
For more detailed steps, visit this page: Steps to clear Chrome DNS cache
On Microsoft Edge
- Open the Edge browser.
- Type “edge://net-internals/#dns” in the address bar and press “Enter“.
- Click the “Clear host cache” button to clear Edge DNS cache.
On Firefox
- Open the Firefox browser.
- Type “about:networking#dns” in the address bar and press “Enter”.
- Click the “Clear DNS Cache” button.
- With that, you’ve cleared the DNS cache in the Firefox browser.
How To Check If Windows DNS Cache Is Cleared?
On Windows, you can execute a simple command to check if your Windows DNS cache is cleared. Here’s how:
- Open the Start menu by clicking the Start button on the taskbar.
- Search for “Command Prompt” and click “Open“.
- Run the “ipconfig /displaydns” command.
- One of the two things below will happen:
- If the cache is empty, the response will be “Could not display the DNS Resolver Cache”.
- Otherwise, you will see a significantly shorter list of DNS entries.
- This confirms that your earlier command worked and that the Windows DNS cache has been cleared.
Note: For best results, run this command immediately after flushing Windows DNS cache.
That is all. It is that simple to clear the DNS cache in Windows 11 and 10.
If you still feel that your internet is slow or websites are taking too long to resolve, your current DNS servers might be the issue. In that case, you might have to change your DNS server settings to use faster DNS servers like Google Public DNS or Cloudflare DNS. You can do this manually via the Settings app or use a free DNS changer software, like WinDNS, to switch with a single click.
If you have any questions or need help, comment below. I’ll be happy to assist.
Thanks!