How to Flush DNS Cache in Windows 10
In this article
Yes, you can flush the DNS cache in Windows 10 by running a single command in the Command Prompt. This action clears outdated or corrupted domain name records from your computer's memory, forcing the system to fetch fresh data from your internet provider's servers. It is the fastest way to resolve issues where websites fail to load despite having a working internet connection.
What You'll Need
- A Windows 10 PC with administrative privileges
- Access to the Command Prompt (CMD) or PowerShell
- Your current network connection active
Note: While standard user accounts can view the DNS cache, only administrators can execute the flush command. If you are using a work or school computer, you may need to contact your IT department if this step fails due to restricted permissions.
Step-by-Step
- Open the Start Menu: Click the Windows icon in the bottom-left corner of your screen, or press the
Windows Keyon your keyboard. - Search for Command Prompt: Type
cmdorCommand Promptinto the search bar. Do not just click the first result yet; we need to run it as an administrator. - Run as Administrator: Right-click on the
Command Promptapp that appears in the search results. From the context menu, selectRun as administrator. If a User Account Control (UAC) prompt appears asking for permission, clickYes. - Verify the Window: A black window titled "Command Prompt" will open. You might see a message saying "Administrator: Command Prompt" at the top. This confirms you have the necessary rights to modify system settings.
- Enter the Flush Command: Type the following text exactly as shown below and then press the
Enterkey:ipconfig /flushdns
- Check the Result: The system will process the command immediately. You should see a confirmation message that reads: "Successfully flushed the DNS Resolver Cache."
- Close the Window: You can now close the Command Prompt window by typing
exitand pressingEnter, or simply clicking theXin the top-right corner.
The process is complete. Your DNS cache has been cleared. You do not need to restart your computer for these changes to take effect, but you may want to refresh your web browser tabs to test if the issue is resolved.
Common Mistakes
- Skipping Administrator Rights: Many users double-click Command Prompt instead of right-clicking and selecting "Run as administrator." Without elevated privileges, the command will often fail with an "Access Denied" error. Always ensure the window title says "Administrator."
- Typos in the Command: The command is case-insensitive, but spaces matter. Ensure there is a space between
ipconfigand/flushdns. Typingipconfig/flushdnswithout the space will result in an error. - Expecting Immediate Speed Boosts: Flushing DNS does not increase your internet bandwidth or download speeds. It only fixes connectivity errors related to incorrect or stale website addresses. If your internet is slow, flushing DNS will not fix a throttled connection.
- Ignoring Browser Caches: Sometimes the issue is not the system DNS but the browser's own cache. If flushing DNS doesn't fix a specific website, you may also need to clear your browser's cache and cookies separately.
Tips
- Use PowerShell as an Alternative: If you prefer PowerShell, you can open it as an administrator and type
Clear-DnsClientCache. This achieves the exact same result and is useful if you are comfortable with more advanced command-line interfaces. - Flush After Router Changes: If you recently changed your router's DNS settings or switched ISPs, always flush your local DNS cache afterward. Your computer might still be trying to use the old server addresses until the cache is cleared.
- Check for IP Conflicts: If you frequently encounter DNS issues, consider setting a static IP address or using a public DNS service like Google DNS (8.8.8.8) or Cloudflare (1.1.1.1). These services are often faster and more reliable than default ISP DNS servers.
- Verify Network Adapter: If the flush command works but you still cannot connect, try resetting your network adapter. Go to Settings > Network & Internet > Status > Network reset. Note that this will reinstall network adapters and reset all network settings to their defaults.
Troubleshooting
If the standard method did not go to plan, follow these steps to diagnose the underlying issue.
Error: "Access Denied" This means you are not running with admin rights. Close the window and repeat Step 3, ensuring you explicitly select "Run as administrator." If you still get denied, check your user account type in Settings > Accounts > Family & other users to ensure you are an Administrator.
Error: "'ipconfig' is not recognized..."
This indicates a problem with your system environment variables. Restart your computer and try again. If it persists, your Windows installation may be corrupted, requiring a system file check. Open CMD as admin and type sfc /scannow to repair system files.
DNS Still Not Working After Flush
If the command succeeds but websites still won't load, the issue may lie elsewhere. Try pinging a known IP address (like ping 8.8.8.8). If that works, your internet is fine, but your DNS configuration might be broken. Try manually setting your DNS to 8.8.8.8 in your Network Adapter properties under IPv4 settings.
Browser-Specific Issues If only one website fails to load while others work, the problem is likely with that specific site or your browser's cache. Clear your browser history and cache. If the site works in a different browser (e.g., Chrome vs. Edge), the issue is isolated to the first browser's extensions or settings.