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.
Locahl Team
Table of Contents
Need to flush the DNS cache on Windows right now? Open Command Prompt or PowerShell and run:
ipconfig /flushdnsUse it after editing the hosts file, changing DNS servers, testing a migration, or when a domain still resolves to an old IP address.
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.
When to flush DNS on Windows
- You edited
C:\Windows\System32\drivers\etc\hostsbut 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
ipconfig /displaydns
nslookup myproject.testIf 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(oredge://net-internals/#dns) and click Clear host cache. - Firefox: open
about:networking#dnsand 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>hostnamewith nohttp://or port, then flush again. - Only one app affected: restart that app; some keep long-lived connections.
If you switch local domains often, a visual hosts manager like Locahl 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._
Ready to simplify your workflow?
Stop wasting time with the terminal. Locahl lets you manage your hosts file in a few clicks, with automatic validation and no risk of errors.
- Intuitive visual interface
- Automatic DNS flush
- Multi-environment management
- Automatic backups
- JSON Import/Export
Reader Reviews
"ipconfig /flushdns from an elevated prompt fixed my stale hosts entry on Windows 11 instantly."
June 12, 2026
"Clear steps and the verification command. Solved my local domain pointing to the old IP."
June 10, 2026
"Worked perfectly. A note on WSL2 DNS would round it out."
June 8, 2026
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.
Related Articles
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.
Locahl Team
Developer tools team
macOS Tahoe Flush DNS Cache Command
Clear DNS cache on macOS Tahoe 26 with the exact Terminal command, verification steps, browser cache checks and hosts file troubleshooting.
Locahl Team
Developer tools team
Flush DNS Mac: macOS Cache Command (2026)
Copy the exact macOS flush DNS cache command for Tahoe, Sequoia, Sonoma, Ventura and older versions. Includes browser cache fixes.
Locahl Team
Best Hosts File Editors for Windows (2026)
The best hosts file editors for Windows in 2026: Locahl, Notepad as admin, Hosts File Editor+, SwitchHosts and BlueLife Hosts Editor. Pros, cons and when to use each.
Locahl Team
Developer tools team
Clear DNS Cache in Microsoft Edge (2026)
Clear the DNS cache in Microsoft Edge with edge://net-internals/#dns, flush socket pools, and clear the Windows DNS cache so hosts changes take effect.
Locahl Team
Developer tools team