---
title: "How to Flush DNS in Windows 10"
description: "Flush and clear the DNS Resolver Cache in Windows 10 using the built-in ipconfig command or PowerShell’s Clear-DnsClientCache!"
canonical: "https://adamtheautomator.com/flush-dns-in-windows-10/"
---

# How to Flush DNS in Windows 10

> Flush and clear the DNS Resolver Cache in Windows 10 using the built-in ipconfig command or PowerShell’s Clear-DnsClientCache!

Source: https://adamtheautomator.com/flush-dns-in-windows-10/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![How to Flush DNS in Windows 10](https://adamtheautomator.com/wp-content/uploads/2021/02/How-to-Flush-DNS-in-Windows-10.jpg)

# How to Flush DNS in Windows 10

[![](https://secure.gravatar.com/avatar/6fac870bd46517f209a580d0af97a407e8dbf66931a2417ce76d0a09198a43b4?s=192&d=mm&r=g)Anthony Metcalf](https://adamtheautomator.com/author/anthony-metcalf/)22 February 20212 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Windows 10](/tag/windows-10/)

Table of Contents

*   [Prerequisites](#h-prerequisites)
*   [What’s a DNS Cache?](#h-what-s-a-dns-cache)
*   [Reading the Windows 10 DNS Resolver Cache](#h-reading-the-windows-10-dns-resolver-cache)
*   [Using ipconfig /flushdns](#h-using-ipconfig-flushdns)
*   [Clearing the Windows 10 DNS Cache With PowerShell](#h-clearing-the-windows-10-dns-cache-with-powershell)
*   [Next Steps](#h-next-steps)

Have you ever encountered a web page that refused to load? Your Windows 10 computer relies on the Domain Name System (DNS) resolver cache, to turn domain names into IP addresses. Sometimes, you need to flush, or clear, your DNS cache in Windows 10 when a website refuses to load.

In this article, you’re going to learn how to clear a DNS cache as a troubleshooting method in Windows 10 using the built-in `[_ipconfig_](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ipconfig)` command and with PowerShell’s `[_Clear-DnsClientCache_](https://docs.microsoft.com/en-us/powershell/module/dnsclient/clear-dnsclientcache?view=windowsserver2022-ps&viewFallbackFrom=win10-ps)` cmdlet.

## Prerequisites

To follow along with the examples in this article, you’ll need to adhere to the following.

*   PowerShell – You can use Windows PowerShell 5.1 or PowerShell 7.x. All examples will use PowerShell 7.1.

**_Related: [Upgrading to PowerShell 7: A Walkthrough](https://adamtheautomator.com/powershell-7-upgrade/)_**

*   Windows 10 – Any recent version of Windows will work. This tutorial is using Windows 10.

## What’s a DNS Cache?

Computer networking uses IP addresses to talk to a remote system. You may remember [_google.com_](http://google.com), but how about `172.217.169.68`? A DNS server exists to translate between the two values and make navigation easier.

Instead of requesting an IP address for a website every time, Windows 10 will build a cache mapping an IP address to a domain name as you browse the internet.

## Reading the Windows 10 DNS Resolver Cache

Before you begin modifying your system by flushing the DNS cache, you should first know how to read it. You should always see what you’re removing before you remove it!

One way to read a local DNS cache is with PowerShell. PowerShell comes with a built-in cmdlet called [`Get-DnsClientCache`](https://docs.microsoft.com/en-us/powershell/module/dnsclient/get-dnsclientcache?view=windowsserver2022-ps&viewFallbackFrom=win10-ps) that will return all entries in the cache.

1.  Open a PowerShell console by first using the key combination **Windows Key+R** to open the **Run** window.

> _Ensure you run [PowerShell as administrator.](https://adamtheautomator.com/powershell-run-as-administrator/)_

2\. Enter `powershell` and press enter to open a Windows PowerShell session.

> _If you are using PowerShell 7.x, use `pwsh` at the **Run** prompt instead!_

3\. Run `Get-DnsClientCache` with no parameters as shown below. You’ll then see all of the DNS records that Windows 10 has cached.

```powershell
Get-DnsClientCache 
```

![Retrieving the contents of the DNS cache using the PowerShell command Get-DnsClientCache.](https://adamtheautomator.com/wp-content/uploads/2021/02/Untitled-2021-02-15T164847.032.png)

Retrieving the contents of the DNS cache using the PowerShell command `Get-DnsClientCache`.

4\. If, for example, you only want to see specific types of records, use the `Type` parameter.

```powershell
Get-DnsClientCache -Type A 
```

![Returning only A records using the PowerShell command Get-DnsClientCache.](https://adamtheautomator.com/wp-content/uploads/2021/02/Untitled-2021-02-15T164923.680.png)

Returning only `A` records using the PowerShell command `Get-DnsClientCache`.

## Using ipconfig /flushdns

The original way to flush DNS in Windows 10 (and earlier) is by using the `ipconfig` command. Although the `ipconfig` command has been around since Windows NT, it gained the ability to flush the DNS resolver cache in Windows 2000.

Use the ipconfig command to clear the Windows 10 DNS resolver cache by:

1.  Hit Windows Key+R to open up the Run window.

2\. Type `cmd` to open up a command prompt window.

3\. Type `ipconfig /flushdns`. The flushdns parameter finds the current resolver cache and removes all entries immediately.

```powershell
 ipconfig /flushdns 
```

![Flushing the Windows 10 DNS cache using ipconfig. ](https://adamtheautomator.com/wp-content/uploads/2021/02/Untitled-2021-02-15T165149.305.png)

Flushing the Windows 10 DNS cache using `ipconfig`.

**_Related: [The ipconfig Commands You Need to Know](https://adamtheautomator.com/ipconfig-commands/)_**

## Clearing the Windows 10 DNS Cache With PowerShell

Perhaps you’re writing an automation script and need to ensure the DNS resolver cache is cleared as part of it. Or maybe you just like PowerShell! Regardless, you can use a cmdlet called `Clear-DnsClientCache` to perform the exact same task as `ipconfig`.

To use PowerShell to clear the Windows 10 DNS resolve cache:

1.  While in PowerShell, run `Clear-DnsClientCache` and hit Enter.

> _You can also use the `Verbose` parameter to displays exactly what the command will do upon completion._

```powershell
Clear-DnsClientCache # The Verbose parameter outputs user-friendly messages Clear-DnsClientCache -Verbose 
```

![Clear the Windows 10 DNS Cache using PowerShell's Clear-DnsClientCache.](https://adamtheautomator.com/wp-content/uploads/2021/02/Untitled-2021-02-15T165341.306.png)

Clear the Windows 10 DNS Cache using PowerShell’s `Clear-DnsClientCache`.

## Next Steps

You do not need to understand the DNS system in-depth to quickly fix problems loading websites in Windows 10. In this article, you have learned how to flush, or clear, the Windows 10 DNS Resolver Cache using both `ipconfig` and the PowerShell command, `Clear-DnsClientCache`.

Take this one step further and see if you can clear remote system DNS client caches using `Clear-DnsClientCache`! Hint: Use the `Invoke-Command` cmdlet.

**_Related: [Invoke-Command: The Best Way to Run Remote Code](https://adamtheautomator.com/invoke-command/)_**

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fflush-dns-in-windows-10%2F&text=How%20to%20Flush%20DNS%20in%20Windows%2010)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fflush-dns-in-windows-10%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fflush-dns-in-windows-10%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2024/01/OpenSSL-on-Windows-10.jpg)

### [Master OpenSSL on Windows 10: A Guide to Powerful Security](/openssl-windows-10/)

Master OpenSSL on Windows 10 with PowerShell, from installation to certificate signing requests and conversions.

![](https://adamtheautomator.com/wp-content/uploads/2020/07/bitlocker-recovery-key.jpg)

### [Save & Recover Bitlocker Recovery Keys: A Complete Guide](/bitlocker-recovery-key/)

Learn how to save and recover Bitlocker recovery keys from files, USB drives, AD, Azure AD, and more in this tutorial.

![](https://adamtheautomator.com/wp-content/uploads/2021/05/How-to-Partition-and-Erase-Windows-Volumes-with-Diskpartx.jpg)

### [Mastering Diskpart : Erase and Partition Volumes with Ease](/diskpart/)

Learn how to create partitions, create volumes, delete volumes and partitions and manage unallocated space with the Windows Diskpart utility.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
