How to Flush and Reset DNS in Windows 10
In this article
Flushing the DNS cache on Windows 10 clears outdated or corrupted domain name system records from your computer's memory. This action forces your system to fetch fresh, accurate IP addresses from your DNS server, which is the most effective first step for resolving issues like websites failing to load, slow browsing speeds, or incorrect site redirections. No special software or third-party tools are required; you only need access to the Command Prompt with administrative privileges.
What You'll Need
- A Windows 10 PC with administrator access
- The Command Prompt (run as Administrator)
Step-by-Step
- Open the Start Menu: Click the Windows icon in the bottom-left corner of your taskbar or press the Windows key on your keyboard.
- Search for Command Prompt: Type "cmd" or "Command Prompt" into the search bar. Do not press Enter yet.
- Run as Administrator: On the right side of the search results, click "Run as administrator." If prompted by User Account Control (UAC), click "Yes" to allow the app to make changes.
- Clear the DNS Cache: In the black Command Prompt window, type the following command exactly:
ipconfig /flushdns. Press the Enter key. - Verify Success: Wait a moment for the process to complete. You should see a message stating "Successfully flushed the DNS Resolver Cache." This confirms the old data has been removed.
- Reset TCP/IP Stack (Optional but Recommended): To ensure a complete reset, type
netsh int ip resetand press Enter. Then, typenetsh winsock resetand press Enter. These commands restore network components to their default state. - Restart Your Computer: Close the Command Prompt and restart your PC immediately to apply the network stack resets fully.
Common Mistakes
One frequent error is forgetting to run the Command Prompt as an administrator. Without elevated privileges, the flush command may appear to work but often fails silently or returns an access denied error. Another common mistake is skipping the restart after running the netsh commands; without a reboot, the Winsock and TCP/IP resets may not take effect until the next login. Users also sometimes confuse flushing the DNS with changing their DNS servers; remember that flushing only deletes local cached records, it does not change which DNS provider (like Google or Cloudflare) you use.
Tips
If you are experiencing persistent connectivity issues, consider manually setting your DNS servers to public resolvers like Google (8.8.8.8) or Cloudflare (1.1.1.1) after flushing the cache. This can often provide faster and more reliable resolution than your ISP's default servers. Additionally, if you frequently travel between networks, creating a desktop shortcut for the ipconfig /flushdns command can save time compared to opening the full Command Prompt interface every time.
Troubleshooting
If the flush command reports success but websites still do not load, the issue likely lies beyond the local cache. First, verify your physical connection by pinging a known IP address like ping 8.8.8.8; if this works, your internet connection is active, and the problem is DNS-specific. Try clearing your browser cache, as some browsers store their own DNS-like records. If problems persist, check for Windows updates, as outdated network drivers can cause resolution failures. As a last resort, perform a network adapter reset via Settings > Network & Internet > Status > Network reset, but note that this will remove saved Wi-Fi passwords and require reconfiguration of network settings.
Frequently Asked Questions
Does flushing DNS delete my browsing history?
No. Flushing the DNS cache only removes temporary IP address mappings stored by Windows. It does not affect your browser history, cookies, or saved passwords.
How often should I flush my DNS cache?
You should only flush your DNS cache when you encounter specific networking issues, such as being unable to access a website that is known to be up. There is no benefit to flushing it regularly if your internet is working correctly.
Will resetting DNS fix slow internet speeds?
It may help if the slowness was caused by corrupted cache entries directing you to wrong or overloaded servers. However, if your internet is slow due to bandwidth limits or hardware issues, DNS flushing will have no impact.
Can I flush DNS using PowerShell instead of Command Prompt?
Yes. Open PowerShell as Administrator and run the same command: ipconfig /flushdns. The result and functionality are identical to the Command Prompt method.
Why does it say 'Bad Request' or 'Access Denied'?
This usually means you did not run the Command Prompt with administrator rights. Close the window, search again, and explicitly select "Run as administrator" before trying the command.