Flushing the DNS cache in Windows 11 clears the stored records of domain name resolutions, which can fix issues like websites not loading, showing outdated content, or returning errors such as DNS_PROBE_FINISHED_NXDOMAIN. This guide walks you through the quickest methods, what to do if the command fails, and common questions about the process.
What You’ll Need
- A Windows 11 PC with administrator access (you’ll need to confirm a UAC prompt).
- An open internet connection (not strictly required to flush, but needed to verify the fix).
Step-by-Step
- Open Command Prompt as Administrator. Click the Start button (or press the Windows key), type
cmdorCommand Promptin the search box. In the search results, right-click on Command Prompt and select Run as administrator. If prompted by User Account Control, click Yes. - Run the flush command. In the Command Prompt window, type the following command and press Enter:
ipconfig /flushdns
You should see the confirmation message: Successfully flushed the DNS Resolver Cache.
- Close the Command Prompt. Type
exitand press Enter, or simply close the window. - Test your connection. Open your web browser and try to visit the site that was having issues. If it still fails, try restarting your browser or your PC.
Alternative method using Windows Terminal: If you prefer, you can use Windows Terminal (which includes PowerShell). Right-click the Start button and select Terminal (Admin), then run the same ipconfig /flushdns command.
Common Mistakes
- Not running as administrator: If you run the command in a normal Command Prompt, you’ll get an error: “The requested operation requires elevation.” Always use “Run as administrator.”
- Typing the command incorrectly: The command is
ipconfig /flushdns(with a forward slash, not a backslash). Typos likeipconfig flushdns(missing slash) will be treated as an invalid command. - Closing the window too quickly: If you close Command Prompt before the command finishes, the flush may not complete. Wait for the confirmation message.
- Confusing with other caches: Flushing DNS does not clear your browser’s cache, cookies, or Windows’ file cache. If a page is still outdated, try clearing your browser cache as well.
Tips
- When to flush: Do this after changing DNS servers (e.g., to Google’s 8.8.8.8), after a website moves to a new IP, or when you get DNS errors that persist after a restart.
- Check your DNS servers: Use
ipconfig /allto see which DNS servers you’re using. If they’re not the ones you expect, your router or ISP may be overriding them. - Use the right command for your network: If you’re connected via a VPN or a virtual adapter, you might also need to flush the DNS for that adapter. The
/flushdnscommand clears the entire cache, so it covers all adapters. - Restart your browser after flushing: Some browsers keep their own DNS cache (e.g., Chrome). Close all browser windows and reopen them to ensure the new DNS settings take effect.
Troubleshooting
If the flush command doesn’t work or you still have issues, try these steps in order:
- Re-run as administrator: Double-check that you’re in an elevated prompt. The title bar of Command Prompt should say “Administrator: Command Prompt”.
- Check for typos: Type the command manually rather than copying and pasting, to avoid hidden characters.
- Restart the DNS Client service: Open Services (press Win+R, type
services.msc, Enter). Find DNS Client, right-click and select Restart. This will also clear the cache. - Reset Winsock and TCP/IP stack: In the same admin Command Prompt, run:
netsh winsock reset
netsh int ip reset
Then restart your PC. This resets network protocols and can fix deeper issues.
- Release and renew your IP address: Run
ipconfig /releasefollowed byipconfig /renew. This gets a fresh IP from your router, which can help if the problem is IP-related. - Temporarily disable your antivirus/firewall: Some security software intercepts DNS queries and may have its own cache. Disable it for a test, and if the site loads, reconfigure the software or contact its support.
- Check your hosts file: A corrupted or outdated entry in
C:\Windows\System32\drivers\etc\hostscan override DNS. Open it with Notepad as administrator and ensure there are no stale entries for the problem domain.
Frequently Asked Questions
How often should I flush DNS?
Only when you encounter DNS-related problems. Flushing too frequently can slow down browsing slightly because your PC has to re-resolve every domain, but it’s harmless.
Will flushing DNS disconnect me from the internet?
No. It only clears the local cache. Your active connections (like downloads or VPN) are not interrupted, and the next time you visit a site, your PC will query the DNS server again.
Does flushing DNS delete my browsing history?
No. The DNS cache is separate from your browser’s history. It only stores IP addresses for domains you’ve visited; it does not contain URLs or page content.
What if I still get DNS errors after flushing?
Try restarting your router, checking your DNS server settings (you can switch to a public DNS like 8.8.8.8), or running the network troubleshooter in Windows Settings > System > Troubleshoot > Other troubleshooters.
Is there a way to flush DNS without using Command Prompt?
You can restart your PC, or restart the “DNS Client” service in Services (as described in Troubleshooting). Both achieve the same result.
Does this work on Windows 10 or older versions?
Yes, the ipconfig /flushdns command works on Windows 10, 8, 7, and even XP. The steps to open an admin Command Prompt are similar across versions.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Spotify Jam Not Working on Mobile? Fixes That Work
- Windows 10 No Internet Secured WiFi Error Fix
- Multi-Cloud GPU Failover Design Guide
- Error Code Currant Destiny? Meaning & Fixes
- AirPlay with Roku Multi-Device Setup: A How-To
- How to Set a Timer on iPhone (iOS 18 & 17)