How to flush DNS cache on Windows 11

Windows 11 flush DNS
Windows 11 flush DNS (Image credit: Future)

On Windows 11, when a particular website isn't loading, an app that requires access to the internet is not working or using networking tools like "ping" or "nslookup" show the wrong destination IP address in the result, it's probably a problem with the local Domain Name System (DNS) cache. In this guide, you will learn how to fix this problem.

When browsing the web or using an app that depends on an internet connection, the Windows 11 networking stack saves a copy of each domain name to an IP address translation from the DNS feature in the local resolver cache to make subsequent connections faster.

How to flush DNS cache from Command Prompt on Windows 11

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to flush the DNS cache on Windows 11 and press Enteripconfig /flushdns

(Image credit: Future)
  1. (Optional) Type the following command to view the cached records from the local DNS and press Enter: ipconfig /displaydns

(Image credit: Future)

Once you complete the steps, the next time the system or an application tries to access the network, a new DNS lookup process will occur to cache the information again.

How to flush DNS cache from PowerShell on Windows 11

To flush the DNS records with PowerShell commands, use these steps:

  1. Open Start.
  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.
  3. Type the following command to clear the DNS cache on Windows 11 and press EnterClear-DnsClientCache

(Image credit: Future)
  1. (Optional) Type the following command to view the cached records from the local DNS and press Enter: Get-DnsClientCache

(Image credit: Future)

After you complete the steps, the PowerShell command will clear and reset the DNS records cached on the device. 

How to flush DNS cache from browser on Windows 11

On Windows 11, the most popular browsers (such as Microsoft Edge, Google Chrome, and Mozilla Firefox) also include an option to clear the DNS cache on Windows 11.

Edge or Chrome 

To clear the DNS cache from Edge or Chrome, use these steps:

  1. Open Edge or Chrome.
  2. Type the following path in the address bar and press Enterchrome://net-internals/#dns
  3. On the "DNS" page, click the "Clear host cache" button for the "Host resolver cache" setting.

(Image credit: Future)

Firefox

To clear the DNS cache from Firefox, use these steps:

  1. Open Firefox.
  2. Type the following path in the address bar and press Enterabout:networking#dns
  3. On the "DNS" page, click the "Clear DNS cache" button.

(Image credit: Future)

Once you complete the steps, similar to using Command Prompt and PowerShell, the web browser will flush the DNS cache to allow websites and other services to work properly again.

This guide focuses on Windows 11, but the command tools, as well as the networking features on Edge, Chrome, and Firefox, are available on Windows 10.

More resources

For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources:

Mauro Huculak
Windows How-To Expert

Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 22 years of combined experience in IT and technical writing. He holds various professional certifications from Microsoft, Cisco, VMware, and CompTIA and has been recognized as a Microsoft MVP for many years.