Sleezr
Buy Sleezr
DNSWindowsflush DNSipconfiglocal development

Flush DNS on Windows 10 & 11: ipconfig /flushdns (2026)

Flush the DNS cache on Windows 10 and 11 with ipconfig /flushdns. Step-by-step command, verification, and fixes when changes still do not apply.

S

Sleezr Team

·3 min read
Flush DNS on Windows 10 & 11: ipconfig /flushdns (2026)

Need to flush the DNS cache on Windows right now? Open Command Prompt or PowerShell and run:

TEXT
ipconfig /flushdns

Use it after editing the hosts file, changing DNS servers, testing a migration, or when a domain still resolves to an old IP address. Need every platform in one place? See how to flush the DNS cache on Windows, Mac, Linux and Chrome.

How to flush DNS on Windows 10 and 11

To flush DNS on Windows, run ipconfig /flushdns from an elevated command prompt:

1
Press the Windows key, type cmd (or PowerShell), right-click it, and choose Run as administrator.
2
Run ipconfig /flushdns.
3
Wait for "Successfully flushed the DNS Resolver Cache."
4
Verify resolution with nslookup myproject.test or ipconfig /displaydns.
5
Reload the page in a fresh browser tab.

The same command works on Windows 10 and Windows 11.

Flush DNS with PowerShell (Clear-DnsClientCache)

If you prefer PowerShell, it ships a native cmdlet that does the same job as ipconfig /flushdns:

POWERSHELL
Clear-DnsClientCache

Inspect what is cached before you clear it with Get-DnsClientCache. Both cmdlets are convenient in scripts and CI runners where you automate a DNS reset.

When to flush DNS on Windows

  • You edited C:\Windows\System32\drivers\etc\hosts but the browser still opens the old site.
  • You switched DNS resolvers (Cloudflare 1.1.1.1, Google 8.8.8.8, a VPN).
  • You moved a staging site to a new server before DNS propagation.

For the full editing workflow, see how to edit the hosts file on Windows.

Verify the result

TEXT
ipconfig /displaydns
nslookup myproject.test

If the command line resolves correctly but the browser does not, the browser is caching the old result.

Clear the browser DNS cache too

  • Chrome / Edge: open chrome://net-internals/#dns (or edge://net-internals/#dns) and click Clear host cache.
  • Firefox: open about:networking#dns and click Clear DNS Cache.

A dedicated browser guide: clear the DNS cache in Microsoft Edge.

Troubleshooting

  • "The requested operation requires elevation": reopen the prompt as administrator.
  • Change still ignored: confirm the hosts line is IP<space>hostname with no http:// or port, then flush again.
  • Only one app affected: restart that app; some keep long-lived connections.
  • WSL2 still resolves the old IP: WSL2 keeps its own resolver, separate from Windows. Inside the distro run sudo resolvectl flush-caches, or run wsl --shutdown from Windows to restart it cleanly.

If you switch local domains often, a visual hosts manager like Sleezr edits the file safely and flushes DNS for you, avoiding malformed lines and forgotten flushes.

_Last tested: June 2026 on Windows 11 23H2 and Windows 10 22H2._

Sources and further reading

Also readHow to edit the hosts file on Windows
Share this article

Frequently Asked Questions

What is the flush DNS command on Windows?

Open Command Prompt or PowerShell and run ipconfig /flushdns. It clears the Windows DNS resolver cache.

Do I need administrator rights to flush DNS on Windows?

Running ipconfig /flushdns works from a standard prompt, but running it as administrator is more reliable, especially after hosts file changes.

How do I know the DNS cache was flushed?

You will see "Successfully flushed the DNS Resolver Cache." Verify resolution with ipconfig /displaydns or nslookup yourdomain.test.

Why does my site still resolve to the old IP after flushing?

Your browser keeps its own DNS cache. Clear it (chrome://net-internals/#dns), and confirm the hosts file entry is correct.

How do I flush the DNS cache with PowerShell?

Run Clear-DnsClientCache in a PowerShell window. Use Get-DnsClientCache first if you want to inspect the cached entries before clearing them.

How do I flush DNS inside WSL2?

WSL2 keeps a separate resolver from Windows. Run sudo resolvectl flush-caches inside the distro, or run wsl --shutdown from Windows to restart it.

Related Articles

2 min read
DNSLinuxflush DNS

Flush DNS on Linux: systemd-resolved & more (2026)

Flush the DNS cache on Linux with resolvectl flush-caches (systemd-resolved), plus nscd, dnsmasq and BIND. Commands by setup, with verification steps.

S

Sleezr Team

Developer tools team

6 min read
DNSmacOS Tahoeflush DNS

macOS 26 Tahoe: Flush DNS Cache Command (2026)

Flush DNS cache on macOS 26 Tahoe with the exact Terminal command, verification steps, browser cache checks, and hosts file troubleshooting.

S

Sleezr Team

Developer tools team

4 min read
hosts filetroubleshootingDNS

/etc/hosts Not Working? Fixes for Windows, Mac & Linux

The hosts file is ignored or /etc/hosts changes do not take effect? Fix it on Windows, Mac and Linux: flush DNS, check syntax, IPv6, line endings, resolver caches and save permissions.

S

Sleezr Team

Developer tools team

10 min read
hosts fileWindowseditors

Best Hosts File Editors for Windows (2026 Comparison)

Compare the best Windows hosts file editors in 2026: Sleezr, PowerToys Hosts File Editor, HostsMan, SwitchHosts, and Notepad. Feature matrix, pros/cons, and who should switch.

S

Sleezr Team

Developer tools team