The Domain Name System (DNS) cache helps Windows 11 load websites faster by storing recently resolved domain names and their corresponding IP addresses. Instead of contacting a DNS server every time you visit a website, Windows checks the local DNS cache first, reducing lookup times and improving browsing performance. While this cache is generally beneficial, it can sometimes become outdated or corrupted, leading to problems such as websites not loading, incorrect website redirects, or difficulty accessing recently updated domains.
Flushing the DNS cache removes all stored DNS records, forcing Windows to retrieve fresh information from your configured DNS server the next time you visit a website. This simple troubleshooting step is often recommended when experiencing internet connectivity issues, website access problems, or DNS-related errors. Fortunately, Windows 11 provides several easy ways to clear the DNS cache using Command Prompt, Windows PowerShell, Windows Terminal, and other built-in tools.
In this guide, you’ll learn multiple methods to flush the DNS cache in Windows 11, understand when you should perform a DNS flush, and discover how to verify that the cache has been cleared successfully.
What Is DNS Cache?
DNS (Domain Name System) translates website names like example.com into numerical IP addresses that computers use to communicate with web servers.
Windows stores recently resolved DNS records in a local cache. This allows websites you’ve previously visited to load faster because Windows doesn’t need to contact the DNS server every time.
However, if a website changes its IP address or the cached record becomes outdated, Windows may continue using the old information until the cache is cleared.
Flushing the DNS cache removes these stored entries and forces Windows to request updated DNS records.
When Should You Flush the DNS Cache?
Flushing the DNS cache can help resolve several network-related problems, including:
- Websites not loading correctly.
- DNS server errors.
- Incorrect website redirects.
- “Server not found” messages.
- Changes to a website’s DNS records not appearing.
- Internet connectivity issues after changing DNS servers.
- Problems accessing newly migrated websites.
- Troubleshooting network configuration issues.
Although flushing DNS is safe, it’s usually only necessary when you’re experiencing DNS-related problems.
Method 1: Flush DNS Using Command Prompt
The Command Prompt method is the most commonly used way to clear the DNS cache.
Click the Start button.
Search for Command Prompt.
Select Run as administrator.
Type the following command:
ipconfig /flushdns
Press Enter.
If successful, you’ll see a message similar to:
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
The DNS cache has now been cleared.
Method 2: Flush DNS Using Windows PowerShell
PowerShell can also perform the same task.
Open Windows PowerShell as Administrator.
Run:
Clear-DnsClientCache
Press Enter.
The DNS cache is removed immediately.
Unlike Command Prompt, PowerShell usually doesn’t display a confirmation message if the command completes successfully.
Method 3: Flush DNS Using Windows Terminal
Windows Terminal combines Command Prompt and PowerShell into a single application.
Open Windows Terminal as Administrator.
If using Command Prompt, run:
ipconfig /flushdns
If using PowerShell, run:
Clear-DnsClientCache
Either command clears the local DNS cache.
Windows Terminal is convenient if you regularly switch between multiple command-line environments.
Method 4: Restart the DNS Client Service
Restarting the DNS Client service also clears cached DNS records.
Press Windows + R.
Type:
services.msc
Press Enter.
Locate DNS Client.
Right-click it.
Select Restart if the option is available.
The DNS service restarts and refreshes cached DNS information.
Some editions of Windows may restrict restarting this service manually.
Method 5: Flush DNS by Restarting the Computer
Restarting your computer refreshes many temporary system components, including portions of the DNS cache.
Click Start.
Select Power.
Choose Restart.
After Windows boots again, many temporary network caches are refreshed automatically.
Although this method isn’t as direct as using the command line, it can resolve minor networking issues.
Method 6: Clear Browser DNS Cache
Some web browsers maintain their own DNS cache separate from Windows.
For browsers that support it, clearing the browser’s internal DNS cache can resolve website loading problems even after flushing the Windows DNS cache.
You can usually accomplish this by restarting the browser or using browser-specific networking tools.
This step is particularly useful if only one browser is experiencing DNS issues.
Method 7: Renew Your IP Address After Flushing DNS
If you’re troubleshooting network problems, renewing your IP address after clearing DNS can sometimes help.
Open Command Prompt as Administrator.
Release the current IP address:
ipconfig /release
Then request a new IP address:
ipconfig /renew
This refreshes your network connection along with the DNS cache.
Method 8: View the Current DNS Cache
Before clearing the cache, you may want to see what’s currently stored.
Open Command Prompt.
Run:
ipconfig /displaydns
Windows displays all cached DNS records currently stored on your computer.
After flushing the cache, running this command again will show significantly fewer entries until you begin visiting websites again.
Method 9: Change Your DNS Server
If DNS problems continue after flushing the cache, your DNS provider may be the issue.
You can switch to another public DNS service by changing your network adapter’s DNS settings.
Popular DNS providers include:
- Google Public DNS
- Cloudflare DNS
- OpenDNS
After changing DNS servers, flush the DNS cache again to ensure Windows begins using the new DNS information immediately.
Method 10: Verify That the DNS Cache Was Cleared
After flushing DNS, it’s helpful to confirm that the operation succeeded.
Open Command Prompt.
Run:
ipconfig /displaydns
Immediately after flushing, the list of cached entries should be much shorter than before.
As you continue browsing the web, Windows automatically rebuilds the DNS cache with fresh records from your configured DNS server.
What Happens After Flushing DNS?
Flushing the DNS cache does not affect your files, browser history, or internet settings.
Instead, Windows simply removes locally stored DNS records.
The next time you visit a website, Windows requests fresh DNS information from your configured DNS server. As a result, the first visit to a website may be slightly slower, but subsequent visits will again benefit from DNS caching.
Is Flushing DNS Safe?
Yes. Flushing the DNS cache is completely safe.
It does not delete personal files, installed applications, saved passwords, or browser data.
The only temporary effect is that Windows must perform fresh DNS lookups the next time you access websites.
For this reason, flushing DNS is a common troubleshooting step recommended by network administrators and technical support professionals.
Common DNS Errors That a Flush Can Fix
Flushing the DNS cache may help resolve issues such as:
- DNS_PROBE_FINISHED_BAD_CONFIG
- DNS_PROBE_FINISHED_NXDOMAIN
- Server DNS address could not be found
- ERR_NAME_NOT_RESOLVED
- Website unavailable after DNS changes
- Incorrect website redirects
- Cached domain records pointing to old servers
- Slow website resolution after changing DNS providers
While not every networking issue is DNS-related, clearing the cache is often one of the quickest troubleshooting steps to try.
Conclusion
Flushing the DNS cache in Windows 11 is a simple but effective way to resolve many common internet and website access problems. Whether you’re dealing with outdated DNS records, website loading errors, or connectivity issues after changing DNS servers, clearing the DNS cache forces Windows to retrieve fresh information from your configured DNS provider. Windows offers several convenient methods for performing this task, including Command Prompt, PowerShell, Windows Terminal, and restarting network services. Because flushing DNS is completely safe and only removes temporary cached records, it’s one of the first troubleshooting steps worth trying whenever you encounter DNS-related problems.
Frequently Asked Questions
What does flushing DNS do?
Flushing DNS removes cached domain name records stored on your computer, forcing Windows to retrieve updated DNS information from your DNS server.
Is flushing DNS safe?
Yes. Flushing DNS is completely safe and does not delete your files, browser history, passwords, or applications.
How often should I flush my DNS cache?
There is no need to flush it regularly. Most users only do so when troubleshooting website access or DNS-related problems.
What command flushes DNS in Windows 11?
The most commonly used command is:
ipconfig /flushdns
Run it in Command Prompt with administrator privileges to clear the Windows DNS cache.


