How to Flush DNS Cache in Windows 11
DNS problems can make websites fail to load even when your Windows 11 computer appears to have a working internet connection. You may see an incorrect website, experience intermittent connection problems, or find that a website works on another device but not on your PC.
One simple troubleshooting step is to flush the DNS cache in Windows 11.
Windows stores recently resolved DNS information in a local DNS client resolver cache. Flushing this cache removes the cached DNS information so Windows can perform fresh DNS lookups when applications request domain names again.
![]() |
| Step-by-step guide to flushing the DNS cache in Windows 11 using Command Prompt. |
Microsoft documents the
ipconfig /flushdns command specifically for flushing and resetting the DNS client resolver cache during DNS troubleshooting.
In this guide, you will learn what the DNS cache does, how to flush it in Windows 11, how to verify the result, when you should use the command, and what to do if flushing the DNS cache does not solve your problem.
What Is DNS Cache in Windows 11?
DNS stands for Domain Name System.
When you enter a website address such as example.com into a browser, your computer needs to determine the IP address associated with that domain name.
DNS servers provide this information.
Windows can temporarily store recently resolved DNS information in its local DNS client resolver cache. This allows frequently requested names to be resolved without always making a new request to the configured DNS server.
The cache can improve efficiency, but stale or incorrect cached information can sometimes contribute to DNS-related troubleshooting problems.
Windows provides the ipconfig /flushdns command to flush and reset the contents of the DNS client resolver cache.
When Should You Flush the DNS Cache?
Flushing DNS can be useful when troubleshooting problems such as:
- A website does not load even though your internet connection works
- A domain recently changed its IP address
- You are receiving unexpected DNS resolution results
- Some websites work while others do not
- You recently changed DNS servers
- You moved between networks
- You are troubleshooting a DNS-related connection problem
- A website works on another device but not on your Windows 11 PC
However, flushing DNS is not a universal solution for internet problems.
If your computer cannot connect to the router, has no valid IP address, or has significant packet loss, clearing the DNS cache will not fix the underlying network problem.
How to Flush DNS Cache in Windows 11
The easiest method is to use Command Prompt.
Step 1: Open Command Prompt
Press:
Windows + S
Type:
Command Prompt
Right-click Command Prompt and select Run as administrator.
If Windows displays a User Account Control prompt, select Yes.
Step 2: Run the Flush DNS Command
Enter the following command:
ipconfig /flushdns
Press Enter.
Step 3: Check the Result
Windows should display a message indicating that the DNS Resolver Cache was successfully flushed.
The command clears the local DNS client resolver cache. Windows can then obtain DNS information again when a new lookup is required.
Do You Need to Restart Windows After Flushing DNS?
Normally, you do not need to restart Windows simply because you ran ipconfig /flushdns.
The command immediately flushes the DNS client resolver cache.
After running the command, try accessing the website or service that was experiencing the problem.
A restart may still be useful during broader troubleshooting, especially if you are also changing network settings, restarting networking components, or troubleshooting another Windows problem.
How to Check the DNS Cache Before Flushing It
Windows provides another ipconfig option that can display the current DNS resolver cache.
Open Command Prompt and run:
ipconfig /displaydns
This displays DNS information currently stored in the Windows DNS client resolver cache.
You may see domain names and cached DNS records associated with previous lookups.
If you are troubleshooting DNS, you can inspect the cache before flushing it and then compare the behavior after running ipconfig /flushdns.
How to Verify DNS After Flushing the Cache
After flushing the cache, test the domain that was causing problems.
For example:
ping example.com
You can also use nslookup:
nslookup example.com
The nslookup command can help you determine whether Windows can resolve the domain name through DNS.
If the domain resolves correctly, open the website in your browser and test it again.
How to Flush DNS and Test the Connection
If you are troubleshooting a website that does not load, use this sequence:
- Open Command Prompt as administrator.
- Flush the DNS cache.
- Test DNS resolution.
- Test the internet connection.
- Open the website again.
Run:
ipconfig /flushdns
Then:
nslookup example.com
You can also test an external IP address:
ping 1.1.1.1
If the IP address responds but DNS resolution fails, investigate the DNS configuration.
Flush DNS Cache vs Changing DNS Servers
Flushing the DNS cache and changing DNS servers are two different actions.
Flush DNS Cache
Flushing DNS removes cached DNS resolver information stored by the Windows DNS client.
The command is:
ipconfig /flushdns
Change DNS Server
Changing DNS servers changes which DNS resolver Windows uses for future DNS queries.
For example, a user may configure a different DNS provider when troubleshooting DNS availability or performance.
If you want to inspect your current DNS configuration, see:
How to Check DNS Settings in Windows 11
These actions can be used together, but they solve different problems.
What Does ipconfig /flushdns Actually Do?
The command:
ipconfig /flushdns
flushes and resets the contents of the DNS client resolver cache.
This means Windows removes cached DNS resolver information that it has stored locally.
When an application needs to resolve a domain name afterward, Windows can perform a new DNS lookup instead of relying on the old cached information.
This can be useful when troubleshooting stale or incorrect DNS resolution information.
Can Flushing DNS Fix Websites That Will Not Load?
Sometimes.
If the problem is related to stale DNS information in the Windows DNS client resolver cache, flushing the cache may resolve the problem.
However, a website may fail to load for many other reasons.
Possible causes include:
- Internet connection problems
- DNS server problems
- Router problems
- Packet loss
- Firewall configuration
- VPN or proxy problems
- Browser problems
- The website itself being unavailable
- Incorrect system configuration
Therefore, flushing DNS should be considered one troubleshooting step rather than a guaranteed fix.
What If ipconfig /flushdns Does Not Work?
If flushing the DNS cache does not solve the problem, continue testing the connection.
1. Check Your IP Address
ipconfig
Make sure the active network adapter has a valid IP address.
For more information:
How to Check IP Address in Windows 11
2. Test the Router
Find your default gateway with:
ipconfig
Then ping the gateway:
ping YOUR-GATEWAY
Replace YOUR-GATEWAY with your actual gateway address.
3. Test an External IP Address
ping 1.1.1.1
If this works but domain names do not resolve, DNS becomes a stronger suspect.
4. Test DNS Resolution
nslookup example.com
If nslookup fails, investigate your DNS server configuration and network connection.
5. Check Packet Loss
Run:
ping /n 100 1.1.1.1
Packet loss can cause websites and online services to behave unpredictably.
See:
How to Check Packet Loss in Windows 11
How to Flush DNS Cache Using Windows Terminal
You can also run the same command from Windows Terminal.
Open Start and search for:
Windows Terminal
Right-click it and select Run as administrator.
Then enter:
ipconfig /flushdns
Press Enter.
The command works because ipconfig is a Windows networking command available from Command Prompt and Windows Terminal.
How to Flush DNS Using PowerShell
You can also open PowerShell or Windows Terminal and run:
ipconfig /flushdns
The command is part of the Windows ipconfig utility, so it can be used from different Windows command-line environments.
If you are troubleshooting DNS, using the familiar ipconfig /flushdns command is usually the simplest approach.
Should You Run ipconfig /flushdns Regularly?
There is normally no reason to flush the DNS cache on a fixed schedule when your internet connection is working normally.
Windows uses its DNS cache to avoid unnecessary repeated DNS lookups.
Flushing the cache is more useful as a troubleshooting action when you have a reason to suspect stale or incorrect cached DNS information.
In other words, do not treat DNS flushing as a routine performance optimization.
Does Flushing DNS Improve Internet Speed?
Usually, no.
Flushing the DNS cache does not increase your internet bandwidth.
It also does not increase your Wi-Fi signal strength or eliminate network congestion.
If your internet connection is slow, measure the connection speed and investigate other possible causes.
See:
How to Check Internet Speed in Windows
Does Flushing DNS Delete Your Internet Settings?
No.
The ipconfig /flushdns command only flushes the DNS client resolver cache.
It does not perform a complete network reset.
Your IP configuration, Wi-Fi settings, network adapter, and other network settings are not reset simply because you flush the DNS cache.
This makes DNS flushing considerably less disruptive than performing a full Windows network reset.
If you need to reset the broader network configuration, see:
How to Reset Network Settings in Windows 11
Flush DNS vs Network Reset
These troubleshooting methods should not be confused.
| Action | Purpose | Impact |
|---|---|---|
| Flush DNS | Clears the DNS client resolver cache | Low |
| Reset Winsock | Resets the Winsock catalog | Moderate |
| Reset TCP/IP | Resets TCP/IP configuration components | Moderate |
| Network Reset | Resets and reinstalls network adapters and networking components | High |
If you are only troubleshooting a possible DNS cache problem, start with ipconfig /flushdns before using more disruptive network reset procedures.
How to Flush DNS and Reset Winsock
If DNS flushing alone does not resolve a network problem, Microsoft also documents a broader sequence of network commands for troubleshooting connectivity.
Open Command Prompt as administrator and run the following commands in order:
netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
These commands perform different functions. They should not be treated as interchangeable with simply flushing the DNS cache.
After using broader network reset commands, restart Windows if required and test the connection again.
How to Check DNS Settings Before Flushing the Cache
Before changing anything, you can inspect the DNS servers currently configured for your network adapter.
Run:
ipconfig /all
Look for the DNS Servers section associated with your active adapter.
You can compare this information with your intended DNS configuration.
For a complete guide, see:
How to Check DNS Settings in Windows 11
What If Only One Website Does Not Work?
If only one website fails while other websites work normally, flushing DNS may be worth trying, but do not immediately assume that Windows DNS is the cause.
The problem may be specific to:
- The website's DNS records
- The website server
- Your browser
- A VPN or proxy
- A firewall or security application
- Your ISP's DNS resolver
Test the same website from another device connected to the same network.
If it also fails on another device, the problem may not be specific to your Windows 11 PC.
What If Websites Work by IP Address but Not by Domain Name?
This is an important clue during DNS troubleshooting.
If your computer can reach an IP address such as:
ping 1.1.1.1
but cannot resolve a domain name such as:
ping example.com
then DNS resolution deserves further investigation.
Run:
nslookup example.com
Then check which DNS server is being used and whether the lookup succeeds.
What If You Get a 169.254.x.x IP Address?
If ipconfig shows an IPv4 address beginning with 169.254., the problem may be related to Windows obtaining an IP address from the network.
In that situation, flushing DNS is unlikely to be the primary solution because the problem occurs before normal DNS troubleshooting becomes useful.
Check the network adapter, router, DHCP configuration, and physical connection.
For more information about your network adapter:
How to Check Network Adapter in Windows 11
Can Flushing DNS Fix Wi-Fi Problems?
It can help with DNS-related problems while connected through Wi-Fi, but it does not repair the wireless connection itself.
If your Wi-Fi signal is weak, the router is disconnected, or the wireless adapter is malfunctioning, flushing DNS will not correct those problems.
Check your Wi-Fi signal first:
How to Check Wi-Fi Signal Strength in Windows 11
Can Flushing DNS Fix Ethernet Problems?
Flushing DNS may help if Ethernet is connected but DNS resolution is failing.
However, if Windows does not detect the Ethernet adapter or the cable connection is physically unavailable, DNS flushing will not solve the problem.
Check the Ethernet connection and network adapter first.
Common DNS Troubleshooting Commands in Windows 11
Here are several useful commands for DNS and network troubleshooting:
| Command | Purpose |
|---|---|
ipconfig |
Displays basic IP configuration |
ipconfig /all |
Displays detailed network configuration |
ipconfig /displaydns |
Displays the DNS resolver cache |
ipconfig /flushdns |
Flushes and resets the DNS resolver cache |
ipconfig /release |
Releases the current DHCP-assigned IP configuration |
ipconfig /renew |
Requests a renewed DHCP IP configuration |
ipconfig /registerdns |
Initiates dynamic DNS registration |
nslookup example.com |
Tests DNS name resolution |
ping example.com |
Tests connectivity and name resolution |
Frequently Asked Questions
How do I flush DNS cache in Windows 11?
Open Command Prompt as administrator and run ipconfig /flushdns. Press Enter and wait for Windows to confirm that the DNS Resolver Cache was successfully flushed.
Do I need administrator access to flush DNS?
Opening Command Prompt with administrator privileges is the recommended approach for Windows network troubleshooting commands.
Does flushing DNS delete my Wi-Fi password?
No. Flushing the DNS cache does not perform a network reset and does not remove your saved Wi-Fi password simply because the DNS cache was cleared.
Does flushing DNS improve internet speed?
Not normally. Flushing DNS is a troubleshooting procedure for DNS resolution problems, not a method for increasing internet bandwidth.
Should I flush DNS every day?
No. There is normally no need to flush the DNS cache regularly when your connection is working correctly.
Does flushing DNS require a restart?
No. The DNS cache is flushed when the command runs. A restart may be appropriate for other troubleshooting steps, but it is not normally required just to flush DNS.
What command shows the DNS cache?
Run:
ipconfig /displaydns
What command clears the DNS cache?
Run:
ipconfig /flushdns
Can flushing DNS fix a website that is down?
No. If the website itself is unavailable, clearing the local DNS cache will not repair the website's server or network.
What should I do if flushing DNS does not work?
Check your IP configuration, default gateway, DNS settings, packet loss, network adapter, router, and internet connection. You can also use broader Windows network troubleshooting commands when appropriate.
Final Thoughts
Flushing the DNS cache is one of the simplest DNS troubleshooting steps available in Windows 11.
The main command is:
ipconfig /flushdns
It flushes and resets the DNS client resolver cache so Windows can perform fresh DNS lookups when needed.
This can be useful when troubleshooting stale or incorrect DNS resolution information, but it should not be treated as a universal solution for internet problems.
If flushing DNS does not solve the issue, continue troubleshooting systematically. Check your IP address, default gateway, DNS servers, packet loss, network adapter, and internet connection.
For broader Windows network problems, you can also review our guide:
How to Reset Network Settings in Windows 11
Using the least disruptive troubleshooting step first is usually the best approach. If the problem specifically points toward DNS resolution, flushing the DNS cache is a quick and low-impact step to try.
Related Articles
- How to Check DNS Settings in Windows 11
- How to Reset Network Settings in Windows 11
- How to Check IP Address in Windows 11
- How to Check Network Adapter in Windows 11
- How to Ping an IP Address in Windows 11
- How to Check Packet Loss in Windows 11
- How to Check Internet Speed in Windows
- How to Check Wi-Fi Signal Strength in Windows 11

