Why Flush DNS on Windows
Windows stores DNS lookup results in a local cache to speed up future requests. This cache can become outdated when DNS records change, a website moves to a new server, or you change your DNS provider. Flushing the cache forces Windows to fetch fresh DNS records.
You should flush DNS after changing your DNS server settings, when a website is unreachable but works on other devices, after malware removal, or when troubleshooting network issues.
Method 1: Command Prompt (Recommended)
The fastest way to flush DNS on Windows is using the command prompt. This works on both Windows 10 and Windows 11.
Step 1: Open Command Prompt as Administrator. Press the Windows key, type "cmd", right-click on "Command Prompt", and select "Run as administrator".
Step 2: Type the following command and press Enter: ipconfig /flushdns
Step 3: You will see a confirmation message: "Successfully flushed the DNS Resolver Cache." This means the cache has been cleared.
The entire process takes about 5 seconds. No restart is required.
Method 2: PowerShell
Open PowerShell as Administrator and run: Clear-DnsClientCache
This achieves the same result as ipconfig /flushdns. PowerShell is available on all modern Windows versions and is preferred by system administrators.
Method 3: Windows Settings (Indirect)
There is no direct "flush DNS" button in Windows Settings. However, you can achieve the same effect by toggling your network adapter off and on, or by restarting the DNS Client service from Services.msc.
The command line methods are faster and more reliable. Use Settings only if you are not comfortable with the command prompt.
Browser DNS Cache
Modern browsers maintain their own DNS cache separate from Windows. After flushing the Windows DNS cache, you may also need to clear the browser cache.
In Chrome, visit chrome://net-internals/#dns and click "Clear host cache". In Firefox, go to about:networking#dns and click "Clear DNS Cache". In Edge, visit edge://net-internals/#dns.
For most users, flushing the Windows DNS cache is sufficient. Browser cache issues are less common.
After Flushing — What to Do Next
After flushing DNS, test your connection by visiting a few websites. If you recently changed your DNS provider, run a DNS speed test to verify the new settings are working correctly.
If you are still having connection issues, try flushing the DNS cache on your router by restarting it. Some routers maintain their own DNS cache that needs to be cleared separately.
Frequently Asked Questions
Is it safe to flush DNS cache?
Yes, flushing DNS cache is completely safe. The cache will automatically repopulate as you browse. The only temporary effect is slightly slower first-visit load times until the cache rebuilds.
How often should I flush DNS?
Only when needed: after changing DNS settings, troubleshooting connection issues, or after malware removal. There is no benefit to regular flushing.