How to Clear the DNS Cache Using Command Prompt

For cmd clear dns, run ipconfig /flushdns in Command Prompt as administrator. Follow these steps to clear the Windows DNS resolver cache.

Nov 22, 2026
•
6 min read

Contents

Don't Miss the Good Stuff

Get tech news that matters delivered to your inbox.

To clear the Windows DNS cache using Command Prompt, open it as administrator, run ipconfig /flushdns, and press Enter. The command clears your computer’s DNS resolver cache. The steps below use Windows 11 menus, and Microsoft also documents the command for Windows 10.

The short version

  • Open Command Prompt: Find it through taskbar search and select Run as administrator.
  • Clear Windows DNS: Run ipconfig /flushdns to remove dynamically cached DNS answers.
  • Use another shell: Windows Terminal can host the same command, and PowerShell offers an equivalent command.
  • Browser caches: Chrome, Edge, and Firefox have separate browser DNS cache controls.

PlaceCommand or controlCache cleared
Command Promptipconfig /flushdnsLocal Windows DNS client cache
Command Prompt tab in Terminalipconfig /flushdnsLocal Windows DNS client cache
Windows PowerShell with DnsClientClear-DnsClientCacheLocal Windows DNS client cache
Authorized remote PowerShell sessionClear-DnsClientCache -CimSession COMPUTERNAMEManaged computer’s DNS client cache
Desktop Chrome with the DNS pageClear host cacheChrome host cache
Chromium-based Edge on Windows with the DNS controlClear host cacheEdge host cache
Desktop Firefox with the DNS controlClear DNS CacheFirefox DNS cache
Administrative Command Prompt on a Windows DNS serverdnscmd /clearcacheDNS server cache
Administrative PowerShell with DnsServerClear-DnsServerCache -ForceDNS server cache, with a remote option below

Open Command Prompt as administrator

Select Search on the taskbar and type command prompt into the search box. Select Run as administrator, then select Yes to open the administrative Command Prompt.

Run the DNS flush command

This operation removes dynamically cached DNS answers from the Windows DNS resolver cache. In the administrative Command Prompt, type the following command and press Enter:

ipconfig /flushdns

On Windows 10, run the same command in an administrative Command Prompt. It clears the local Windows DNS client cache on that version too.

Use a Command Prompt tab in Windows Terminal

You can use Windows Terminal on Windows 11 with Terminal, or on Windows 10 where Terminal is already installed. Terminal hosts the command; it does not provide a separate DNS-clearing operation.

Search for Terminal and select Run as administrator, then select Yes. Select the dropdown arrow beside the + button, then select Command Prompt.

Running the flush command removes dynamically cached DNS answers from your Windows DNS resolver cache. In the Command Prompt tab, type the following and press Enter:

ipconfig /flushdns

Clear the same cache with PowerShell

On a Windows computer with the DnsClient PowerShell module, including Windows 11, you can use Clear-DnsClientCache. Microsoft identifies this command as equivalent to ipconfig /flushdns.

Search for Windows PowerShell and select Run as administrator. Select Yes to open the administrative session.

This command removes the contents of the Windows DNS client cache. Type the following command and press Enter:

Clear-DnsClientCache

Clear a browser’s separate DNS cache

Chrome, Edge, and Firefox have their own DNS cache controls. Use the relevant control when you want to clear that browser’s cache, which is separate from the Windows resolver cache.

For desktop Chrome builds that expose the internal DNS page, enter the following address in the address bar and press Enter. This opens the page containing the browser’s host cache control:

chrome://net-internals/#dns

Clearing this cache removes Chrome’s cached host answers. Under Host resolver cache, select Clear host cache.

For Chromium-based Microsoft Edge on Windows, enter the following address in the address bar and press Enter. Microsoft’s support instructions describe this control for Edge 135 on Windows 11 24H2:

edge://net-internals/#dns

Clearing this cache removes Edge’s cached host answers. On builds that show the control, select Clear host cache.

For desktop Firefox with the About Networking DNS control, enter the following address in the address bar and press Enter. It opens the browser’s DNS information and cache control:

about:networking#dns

Clearing this cache removes Firefox’s cached DNS answers. Select Clear DNS Cache.

Clear a managed computer’s client cache remotely

If you administer a managed Windows computer that exposes the DnsClient module through CIM, you can clear its client cache remotely. Remote management and appropriate permissions must already be configured.

This operation removes the target computer’s DNS client cache contents. From an authorized administrative PowerShell session, run the following command, replacing COMPUTERNAME with the managed computer’s name:

Clear-DnsClientCache -CimSession COMPUTERNAME

Clear a Windows DNS server cache from Command Prompt

Use this method only when you administer a DNS server running Windows Server 2016, 2019, 2022 or 2025 with the DNS server administration tools and appropriate permissions. It targets the server cache, a different cache from the local client cache cleared by ipconfig /flushdns.

This operation removes the DNS server’s cached answers. On the DNS server, open an administrative Command Prompt and run:

dnscmd /clearcache

Clear a Windows DNS server cache with PowerShell

You can also clear a Windows DNS server cache through an administrative PowerShell session with the DnsServer module. The -Force option suppresses the confirmation prompt.

The following command removes the local DNS server’s cached answers. In the administrative PowerShell session, run:

Clear-DnsServerCache -Force

The remote version removes the specified DNS server’s cached answers. For a server you administer remotely, run the following command, replacing SERVERNAME with its name:

Clear-DnsServerCache -ComputerName SERVERNAME -Force

Frequently Asked Questions

Does flushing DNS clear negative answers too?

Yes, the Windows flush command clears negative answers. These are included among the dynamically cached DNS answers it removes.

Can you clear the DNS cache on Windows 11 Home?

Yes, the Command Prompt method applies to Windows 11 Home. You can use it on Windows 11 Pro too.

Can you run ipconfig /flushdns directly in PowerShell?

Yes, you can run ipconfig /flushdns directly in an administrative Windows PowerShell session. It clears the same cache as Clear-DnsClientCache, so you can use it as an alternative.

What if the Command Prompt profile has a different name in Terminal?

Windows Terminal profile names can be customized. You can instead select Search on the taskbar, type command prompt, select Run as administrator, then select Yes.

Share