Home / Hardware / Networking / How to Flush DNS in Windows (Command Prompt, PowerShell and Browser)

How to Flush DNS in Windows (Command Prompt, PowerShell and Browser)

Flushing your DNS cache clears out old address records stored on your PC. It’s one of the first things to try when websites won’t load, you’re seeing outdated versions of sites, or you’ve just changed DNS settings and they’re not taking effect. It takes about ten seconds.

What Is the DNS Cache and Why Flush It?

Every time you visit a website, Windows looks up the IP address for that domain and stores it temporarily in a local cache. This speeds up future visits. But if a website changes its IP address, your PC may keep using the old one — causing connection errors or loading the wrong version of a site. Flushing the cache forces Windows to do a fresh lookup next time.

How to Flush DNS in Windows (Command Prompt)

This works on Windows 11, 10, and older versions.

  1. Press Windows key + R, type cmd and press Enter.
  2. Type the following command and press Enter:
ipconfig /flushdns
  1. You’ll see the message: Successfully flushed the DNS Resolver Cache.
  2. That’s it — close the window and try the website again.

How to Flush DNS Using PowerShell

  1. Right-click the Start button and select Terminal or Windows PowerShell.
  2. Type the following and press Enter:
Clear-DnsClientCache

No confirmation message appears — the command just runs silently. If there’s no error, it worked.

How to Flush DNS in Your Browser

Browsers also maintain their own DNS cache, separate from Windows. If flushing the Windows cache doesn’t help, clear the browser’s cache too.

Google Chrome

  1. In the address bar, type: chrome://net-internals/#dns
  2. Click Clear host cache.

Microsoft Edge

  1. In the address bar, type: edge://net-internals/#dns
  2. Click Clear host cache.

Firefox

  1. In the address bar, type: about:networking#dns
  2. Click Clear DNS Cache.

Additional DNS Commands Worth Knowing

While you have Command Prompt open, these related commands are also useful:

ipconfig /displaydns

Shows all currently cached DNS entries — useful for seeing what your PC has looked up recently.

ipconfig /registerdns

Re-registers your PC’s DNS entries with your DNS server — useful in domain environments when your PC isn’t being found by name on the network.

When Flushing DNS Doesn’t Fix the Problem

If flushing the cache doesn’t resolve your issue, try these next steps:

  • Restart your router — your router also has a DNS cache. See: How to Restart Your Router Properly
  • Change your DNS server — if your ISP’s DNS is slow or unreliable, switching to Google (8.8.8.8) or Cloudflare (1.1.1.1) can help.
  • Check the hosts file — entries in C:\Windows\System32\drivers\etc\hosts override DNS and can cause sites to load incorrectly.

Sign Up For Daily Newsletter

Stay updated with our weekly newsletter. Subscribe now to never miss an update!

[mc4wp_form]

Leave a Reply

Your email address will not be published. Required fields are marked *