Clearing the DNS cache on Windows 11 can fix website loading errors, stale IP addresses, and connection issues after network changes. This guide walks you through the fastest methods—using Command Prompt, Windows Terminal, or PowerShell—and explains what to do if the standard commands fail.
What You’ll Need
- An account with administrator privileges (you’ll need to approve a UAC prompt).
- Access to Command Prompt, Windows Terminal, or PowerShell (all built into Windows 11).
- A stable internet connection is not required—the cache is local—but you’ll need it to test the fix afterward.
Step-by-Step
- Open Command Prompt as Administrator
- Click the Start button (or press the Windows key).
- Type
cmdin the search box. - Right-click Command Prompt in the results and select Run as administrator.
- Click Yes on the User Account Control prompt.
Alternatively, you can open Windows Terminal as admin (right-click Start → Terminal (Admin)) and skip to step 3.
- Run the DNS Flush Command
- In the command prompt window, type the following and press Enter:
ipconfig /flushdns- You should see the confirmation: Successfully flushed the DNS Resolver Cache.
- Optional: Reset the DNS Client Service
- If you’re still having issues, restart the DNS client service by typing:
net stop dnscache && net start dnscache- Press Enter. You’ll see messages that the service is stopping and then starting.
- Optional: Clear the Windows Store DNS Cache
- Some apps (like Microsoft Store) use a separate cache. Run:
ipconfig /flushdns- This is actually the same command—the Windows Store cache is cleared with the general flush. No extra step needed.
- Verify the Cache Is Cleared
- To confirm, type:
ipconfig /displaydns- If the cache is empty, you’ll see no output or a message saying the cache is empty. If entries appear, the flush might have failed (see Troubleshooting).
- Test Your Connection
- Close the command prompt and try visiting a website that was failing, or run
ping google.comin a new prompt to see if it resolves correctly.
- Close the command prompt and try visiting a website that was failing, or run
Common Mistakes
- Not running as administrator: If you run
ipconfig /flushdnswithout admin rights, you’ll get an error: An attempt was made to access a socket in a way forbidden by its access permissions. Always right-click and choose “Run as administrator.” - Typing the command wrong: The command is
ipconfig(all lowercase) with a forward slash beforeflushdns. Common typos includeipconfig /flushoripconfig /flush-dns—both will fail. - Using PowerShell without admin: PowerShell also needs to be launched as administrator. If you open it normally, you’ll get a permission error.
- Forgetting to close and reopen browsers: Browsers like Chrome and Firefox have their own DNS caches. Even after flushing the system cache, you may need to close and reopen the browser or clear its internal cache (see Tips).
Tips
- Use Windows Terminal: Windows 11 includes Windows Terminal by default. You can open it as admin and use any tab (PowerShell, Command Prompt, etc.)—the same commands work.
- Clear browser DNS cache too: In Chrome, go to
chrome://net-internals/#dnsand click “Clear host cache.” In Edge, visitedge://net-internals/#dns. Firefox doesn’t have a built-in button, but restarting the browser usually clears its cache. - Use a single command for all: You can combine the flush with other network resets in one line:
ipconfig /flushdns && ipconfig /registerdns && ipconfig /release && ipconfig /renewThis is useful after changing DNS servers or when you have persistent connection issues.
- Create a desktop shortcut: To avoid typing the command every time, create a shortcut that runs
ipconfig /flushdnsas admin. Right-click desktop → New → Shortcut → typecmd /c ipconfig /flushdns→ name it “Flush DNS” → right-click the shortcut → Properties → Advanced → check “Run as administrator.”
Troubleshooting
- “The requested operation requires elevation” error: This means you didn’t run the command as administrator. Close the prompt and reopen it with admin rights (right-click → Run as administrator).
- “Unable to flush the DNS Resolver Cache” error: This can happen if the DNS Client service is stopped. Start it by typing
net start dnscachein an admin prompt, then try the flush again. - Command not recognized: If you see “ipconfig is not recognized as an internal or external command,” your PATH environment variable is broken. Use the full path:
C:\Windows\System32\ipconfig.exe /flushdns. - Still seeing old IP addresses after flush: Your browser or another application may have its own cache. Close all browsers, then flush again. If the issue persists, restart your computer—this clears all temporary network states.
- Flush works but websites still fail: The problem might be your DNS server, not the cache. Try switching to a public DNS like Google (8.8.8.8) or Cloudflare (1.1.1.1) temporarily, or check your router’s DNS settings.
Frequently Asked Questions
How often should I clear the DNS cache?
Only when you encounter issues like websites not loading, wrong IP addresses, or after changing DNS servers. There’s no need to flush it regularly—Windows manages the cache automatically.
Will clearing the DNS cache slow down my internet?
Only temporarily. The cache stores recent lookups to speed up browsing. After clearing, your computer will need to re-resolve domain names, which can make the first few visits to websites slightly slower, but it’s usually unnoticeable.
Does clearing the DNS cache affect my browsing history or passwords?
No. The DNS cache only contains IP addresses and domain names—not your history, cookies, or saved passwords. It’s completely safe for your privacy.
Can I clear the DNS cache without admin rights?
No, the ipconfig /flushdns command requires administrator privileges. If you don’t have admin access, you’ll need to contact your system administrator.
Why does the DNS cache come back after I clear it?
Windows automatically repopulates the cache as you visit websites. That’s normal—the cache is designed to fill itself. If you’re trying to keep a specific entry out, you may need to use a hosts file entry instead.
Is there a difference between flushing DNS in Windows 10 and Windows 11?
No, the command is identical (ipconfig /flushdns). The steps are the same; only the look of the Start menu and Terminal differ slightly.
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
- How to Add & Remove Favorites in Windows 10 Photos App
- Fix Links Not Opening in Chrome: 7 Top Ways
- Connect Alexa to a Soundbar: Choose the Right Setup
- Fix Host Process for Setting Synchronization in Windows 10
- Windows 11 search how to control automatic indexing of frequently used folders?
- How to Set Up Tips on Twitter (X) for Android & iOS