How to fix and clear the Windows 11 DNS cache to resolve website connection issues
Summary
This guide helps you troubleshoot and resolve: How to fix and clear the Windows 11 DNS cache to resolve website connection issues. Follow the steps below to fix the issue.
Common Causes
When you visit a website, Windows 11 stores the DNS (Domain Name System) information locally in a cache. This helps your browser load pages faster on subsequent visits. However, if this cache becomes outdated or corrupted, you may experience issues such as websites failing to load, slow browsing, or error messages like "DNS_PROBE_FINISHED_NXDOMAIN" or "This site can't be reached." Flushing the DNS cache forces Windows to request fresh DNS information, which often resolves these connection problems.
This guide will walk you through several methods to clear the DNS cache on Windows 11, from the quickest command-line fix to more thorough troubleshooting steps.
Quick Fix Steps
If you're in a hurry, follow these steps to flush your DNS cache:
- Right-click the Start button and select Terminal (Admin).
- Click Yes on the User Account Control prompt.
- Type
ipconfig /flushdnsand press Enter. - Wait for the "Successfully flushed the DNS Resolver Cache" message.
- Close the terminal and try loading the website again.
This is the most common and effective method for resolving DNS-related connection issues. If the problem persists, proceed to the detailed instructions below.
Detailed Instructions
Method 1: Flush DNS Using Command Prompt
The Command Prompt method is the traditional approach and works on all versions of Windows.
- Press Start and type
cmd. - Right-click Command Prompt and select Run as administrator.
- Click Yes on the User Account Control prompt.
- Type the following command and press Enter:
ipconfig /flushdns - You should see the confirmation message: "Windows IP Configuration. Successfully flushed the DNS Resolver Cache."
- Test your website or service to confirm the issue is resolved.
Method 2: Flush DNS Using Windows Terminal
Windows 11 includes the modern Windows Terminal, which can run Command Prompt, PowerShell, and other shells in one application.
- Right-click the Start button.
- Select Terminal (Admin).
- Click Yes on the User Account Control prompt.
- The terminal will open with a PowerShell tab by default. Type the following command and press Enter:
ipconfig /flushdns - Confirm the success message appears.
- Close the terminal window.
Method 3: Flush DNS Using PowerShell
If you prefer PowerShell or need to perform additional DNS management tasks, use this method.
- Press Start and type
powershell. - Right-click Windows PowerShell and select Run as administrator.
- Click Yes on the User Account Control prompt.
- Type the following command and press Enter:
Clear-DnsClientCache - The command runs silently with no confirmation message. Close PowerShell when complete.
The Clear-DnsClientCache PowerShell cmdlet performs the same function as ipconfig /flushdns. Use whichever method you find more comfortable.
Method 4: Reset Network Settings
If flushing the DNS cache alone doesn't resolve the issue, you can perform a more thorough network reset. This will reinstall network adapters and reset networking components to their default state.
- Open Settings by pressing Windows + I.
- Navigate to Network & internet.
- Click on Advanced network settings.
- Scroll down and click Network reset.
- Click the Reset now button.
- Confirm by clicking Yes.
- Your computer will restart automatically after 5 minutes. Save any open work before proceeding.
A network reset will remove all saved Wi-Fi passwords, VPN connections, and Ethernet configurations. Make sure you have your Wi-Fi password available before proceeding. You may also need to reconfigure custom DNS settings.
Verifying the DNS Cache Has Been Cleared
After flushing the DNS cache, you can confirm the action was successful by viewing the cache contents.
- Open Command Prompt or Windows Terminal as administrator.
- Type the following command and press Enter:
ipconfig /displaydns - This displays the current DNS resolver cache. If you just flushed it, you should see only a few recent entries (or none at all).
- To exit the display, press Ctrl + C.
Additional Troubleshooting
If clearing the DNS cache doesn't resolve your connection issues, try these additional steps.
Change Your DNS Server
Your ISP's default DNS servers may be experiencing issues or be slow. Switching to a public DNS service can improve reliability and speed.
- Open Settings and navigate to Network & internet.
- Click on your active connection (Wi-Fi or Ethernet).
- For Wi-Fi: click Hardware properties, then Edit next to DNS server assignment.
- For Ethernet: click Edit next to DNS server assignment.
- Select Automatic (DHCP) dropdown and change it to Manual.
- Toggle IPv4 on.
- Enter your preferred DNS addresses:
- Google DNS:
8.8.8.8and8.8.4.4 - Cloudflare DNS:
1.1.1.1and1.0.0.1
- Google DNS:
- Click Save.
- Open Command Prompt as administrator and run
ipconfig /flushdnsagain.
Disable DNS Client Service Temporarily
The DNS Client service manages the DNS cache. Restarting it can resolve stubborn issues.
- Press Windows + R to open the Run dialog.
- Type
services.mscand press Enter. - Scroll down and find DNS Client.
- Right-click it and select Restart.
- If the option is greyed out, right-click and select Stop, wait a few seconds, then select Start.
- Close the Services window and test your connection.
Clear Browser DNS Cache
Modern web browsers maintain their own DNS cache separate from Windows. Clearing this can resolve browser-specific issues.
For Google Chrome:
- Open Chrome and type
chrome://net-internals/#dnsin the address bar. - Click the Clear host cache button.
- Restart Chrome.
For Microsoft Edge:
- Open Edge and type
edge://net-internals/#dnsin the address bar. - Click the Clear host cache button.
- Restart Edge.
For Mozilla Firefox:
- Open Firefox and click the menu button (three lines) in the top-right corner.
- Select Settings > Privacy & Security.
- Scroll to Cookies and Site Data and click Clear Data.
- Check both options (Cookies and Site Data and Cached Web Content) and click Clear.
- Restart Firefox.
Firefox also maintains a separate DNS cache. To clear it, type about:networking#dns in the address bar, then click Clear DNS Cache.
When to Seek Further Help
If you have tried all the methods above and are still experiencing DNS-related connection issues, the problem may lie with your ISP, router, or the website itself. Try the following:
- Restart your modem and router by powering them off for 30 seconds, then turning them back on.
- Test the website on a different device or network to determine if the issue is local.
- Contact your ISP to check if there are any known outages or DNS server issues in your area.
- Check the website's status on a third-party service to confirm it is online.
Still Having Issues?
💻 Open a Ticket