How to Flush DNS Cache in Windows 11

When you visit a website, Windows often stores information about the domain and its associated IP address in a local DNS cache. This allows your computer to resolve frequently visited websites more quickly without having to request the same information from a DNS server every time.

However, cached DNS information can sometimes become outdated or corrupted. When that happens, you may experience problems such as websites failing to open, being redirected incorrectly, or loading an old version of a website. Flushing the DNS cache removes these locally stored DNS records and allows Windows to request fresh information.

Windows 11 provides several ways to clear the DNS cache. The quickest method is to use a simple command in Command Prompt, but you can also use PowerShell and other Windows tools.

Flushing the DNS cache does not delete your personal files, installed applications, or saved browser data. It simply clears locally cached DNS information.

Here are the most useful ways to flush DNS cache in Windows 11.

Method 1: Flush DNS Cache Using Command Prompt

Command Prompt is the fastest way to clear the DNS resolver cache in Windows 11.

  • Press Windows + S to open Windows Search.
  • Type Command Prompt.
  • Right-click Command Prompt in the search results.
  • Select Run as administrator.
  • Click Yes if User Account Control appears.
  • Enter the following command:
ipconfig /flushdns
  • Press Enter.

Windows should display a message similar to:

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

This confirms that Windows has cleared the locally cached DNS information.

You can now close Command Prompt and try opening the website that was previously causing problems.

You usually do not need to restart the computer after flushing the DNS cache. The change takes effect immediately.

Method 2: Clear DNS Cache With Windows PowerShell

PowerShell provides another built-in way to clear the DNS client cache.

  • Press Windows + S.
  • Search for PowerShell.
  • Right-click Windows PowerShell or PowerShell.
  • Select Run as administrator.
  • Approve the User Account Control prompt.
  • Type:
Clear-DnsClientCache
  • Press Enter.

If the command completes without an error, the DNS client cache has been cleared.

PowerShell is particularly useful if you are already working with other PowerShell commands or network troubleshooting scripts.

You can also open Windows Terminal as an administrator and run the same PowerShell command.

After clearing the cache, open a browser and test the affected website again.

Method 3: Use Windows Terminal to Flush the DNS Cache

Windows Terminal provides a convenient interface for running Command Prompt and PowerShell commands from one application.

  • Press Windows + X.
  • Select Terminal (Admin).
  • Click Yes when Windows asks for permission.
  • Make sure the Terminal is running a Command Prompt profile.
  • Enter:
ipconfig /flushdns
  • Press Enter.

Alternatively, if the Terminal tab is running PowerShell, use:

Clear-DnsClientCache

Both commands clear the DNS client cache.

Windows Terminal can be especially convenient because you can switch between Command Prompt and PowerShell tabs without opening separate applications.

Method 4: Check the DNS Cache Before Clearing It

Windows also provides a command that lets you view the DNS entries currently stored on the computer.

  • Open Command Prompt as administrator.
  • Enter:
ipconfig /displaydns
  • Press Enter.

Windows will display cached DNS information.

Depending on how recently you have used the computer, the list can contain many domain names.

You may see information such as:

  • Host names
  • Record types
  • IP addresses
  • Time-to-live values
  • Cached DNS records

This command does not remove anything. It only displays the current DNS resolver cache.

If you are troubleshooting a specific website, you can inspect the output to determine whether Windows has cached information for that domain.

After checking the entries, you can clear them with:

ipconfig /flushdns

This is useful when you want to confirm that the cache actually contained information before removing it.

Method 5: Flush DNS Cache and Test a Website

Sometimes the easiest way to determine whether a DNS cache is responsible for a problem is to clear it and immediately test the affected website.

First, open an elevated Command Prompt and run:

ipconfig /flushdns

Then open your browser.

Enter the website address manually and press Enter.

If the website loads normally after clearing the cache, the problem may have been caused by stale or incorrect DNS information stored locally.

If the website still does not load, the problem may be elsewhere.

For example, the issue could involve:

  • Your internet connection
  • DNS server availability
  • Router configuration
  • Firewall settings
  • Browser problems
  • The website itself
  • Incorrect network configuration

Flushing DNS is therefore a useful troubleshooting step, but it is not a universal solution for every internet problem.

Method 6: Flush DNS After Changing DNS Servers

If you recently changed your DNS server, clearing the cache can help Windows stop using older locally stored DNS responses.

For example, suppose you previously used the DNS servers provided by your internet service provider and then switched to another DNS service.

Windows may still have cached records from previous DNS lookups.

To clear them:

  • Open Command Prompt as administrator.
  • Run:
ipconfig /flushdns
  • Wait for the confirmation message.
  • Close Command Prompt.
  • Reopen your browser.
  • Test several websites.

The next DNS lookups can then be resolved using the current DNS configuration.

This is particularly useful when testing a new DNS service or troubleshooting inconsistent website resolution after changing network settings.

Method 7: Flush DNS When a Website Points to an Old Address

DNS records can change when a website moves to a different server, changes hosting providers, or updates its network configuration.

If your computer has an older DNS response cached locally, you may temporarily receive outdated information.

In this situation, clearing the DNS cache can help Windows obtain a fresh DNS response.

Run:

ipconfig /flushdns

Then try the website again.

If the problem continues, the outdated record may not be stored on your computer. DNS information can also be cached by your router, internet provider, or other DNS resolvers.

In that case, flushing the Windows DNS cache alone may not immediately change the result.

You can use:

nslookup example.com

Replace example.com with the affected domain to see which DNS server is responding and what address it returns.

Method 8: Troubleshoot DNS Problems After Flushing the Cache

If flushing the DNS cache does not solve the problem, check whether Windows can communicate with a DNS server.

Open Command Prompt and run:

nslookup google.com

If the command returns an IP address, DNS resolution is working at a basic level.

You can also test general network connectivity with:

ping 8.8.8.8

If the IP address responds but domain names do not resolve correctly, the issue may involve DNS configuration.

If neither test works, the problem may be related to your internet connection, network adapter, router, firewall, or broader network configuration.

You can also inspect your current network information with:

ipconfig /all

Look for the DNS Servers entry associated with your active network adapter.

This can help determine whether Windows is using the DNS server you expect.

Method 9: Flush DNS Without Restarting Windows

One advantage of flushing the DNS cache is that you normally do not need to restart your PC.

After running:

ipconfig /flushdns

the DNS cache is cleared immediately.

You can continue using Windows normally.

If a website was failing because of an outdated cached DNS record, simply refreshing the browser page may be enough to test whether the problem has been resolved.

If the browser still displays an old page, remember that browsers can also maintain their own caches. In that situation, clearing the Windows DNS cache will not necessarily clear browser cache data.

You can try opening the website in a private browsing window or another browser to determine whether the issue is browser-specific.

Method 10: Know When Flushing DNS Will Not Help

Flushing DNS is useful, but it only addresses cached DNS information on the Windows device.

It will not fix every type of internet problem.

For example, flushing the DNS cache will generally not repair:

  • A disconnected network cable
  • A disabled Wi-Fi adapter
  • A failed router
  • An ISP outage
  • Incorrect proxy settings
  • A damaged network driver
  • A website that is offline
  • A firewall blocking the connection
  • An incorrect IP configuration

If the problem persists after flushing DNS, move on to broader network troubleshooting rather than repeatedly running the same command.

You can check the network adapter, restart the router, verify DNS server settings, or use Windows network troubleshooting tools.

Conclusion

Flushing the DNS cache in Windows 11 is a quick and safe troubleshooting step when websites fail to load correctly or DNS information appears outdated. The simplest option is to open Command Prompt as an administrator and run ipconfig /flushdns.

You can also use PowerShell with Clear-DnsClientCache or run the commands through Windows Terminal. The DNS cache can be inspected beforehand with ipconfig /displaydns, while nslookup can help you investigate whether domain names are resolving correctly.

Clearing the cache does not remove personal files or uninstall applications. It simply forces Windows to obtain fresh DNS information when domain names are resolved again.

If flushing the cache does not fix your problem, investigate the wider network configuration instead of repeatedly clearing the cache.

FAQs

1. Is it safe to flush the DNS cache in Windows 11?

Yes. Flushing the DNS cache is a normal Windows network troubleshooting operation. It removes cached DNS records but does not delete personal files, applications, or documents.

2. How often should I flush the DNS cache?

There is normally no need to flush the DNS cache on a regular schedule. Do it when you are troubleshooting DNS-related problems, after certain network configuration changes, or when cached information appears to be causing a problem.

3. Does flushing DNS improve internet speed?

Not necessarily. Clearing the cache does not automatically increase your internet bandwidth or connection speed. It can, however, resolve problems caused by outdated or incorrect DNS information.

4. Do I need to restart my PC after flushing DNS?

No. The DNS cache is normally cleared immediately after running ipconfig /flushdns. You can continue using Windows without restarting the computer.

Quick Summary

  • Open Command Prompt as administrator and run ipconfig /flushdns.
  • PowerShell users can run Clear-DnsClientCache.
  • Use ipconfig /displaydns to view cached DNS records.
  • If clearing DNS does not solve the issue, investigate your broader network configuration.

Related Articles

Popular Categories