---
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/

---

- How to Flush DNS in Windows 10 Tap to hide Home

- Tutorials

- Guidebooks

- Instructors

- Get Paid to Write

- Advertising

- Recommended Resources

- About Adam

                Search for:

-

-

-

-

# How to Flush DNS in Windows 10

        Published:22 February 2021 - 2 min. read

- Windows 10

          [](https://adamtheautomator.com/author/anthony-metcalf/)

            [Anthony Metcalf](https://adamtheautomator.com/author/anthony-metcalf/)

            Read [more tutorials](https://adamtheautomator.com/author/anthony-metcalf/) by Anthony Metcalf!

-

        [](https://specopssoft.com/product/specops-password-auditor/?utm_source=adamtheautomator&utm_medium=referral&utm_campaign=adamtheautomator_referral_na&utm_content=display)
        Audit Active Directory for stale users, weak passwords, and other security risks with [Specops Password Auditor](https://specopssoft.com/product/specops-password-auditor/?utm_source=adamtheautomator&utm_medium=referral&utm_campaign=adamtheautomator_referral_na&utm_content=text).

Table of Contents

- Prerequisites
- What's a DNS Cache?
- Reading the Windows 10 DNS Resolver Cache
- Using ipconfig /flushdns
- Clearing the Windows 10 DNS Cache With PowerShell
- Next Steps

                XFacebookLinkedIn

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](https://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.

- 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.

Get-DnsClientCache

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.

Get-DnsClientCache -Type A

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:

- 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.

 ipconfig /flushdns

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:

- 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.

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

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/)

  Hate ads? Want to support the writer? Get many of our tutorials packaged as an ATA Guidebook.

  [Explore ATA Guidebooks](https://adamtheautomator.com/ata-guidebooks/)

## More from ATA Learning and Partners

- ### Recommended Resources! Recommended Resources for Training, Information Security, Automation, and more!

- ### Get Paid to Write! ATA Learning is always seeking instructors of all experience levels. Regardless if you’re a junior admin or system architect, you have something to share. Why not write on a platform with an existing audience and share your knowledge with the world?

- ### ATA Learning Guidebooks ATA Learning is known for its high-quality written tutorials in the form of blog posts. Support ATA Learning with ATA Guidebook PDF eBooks available offline and with no ads!

## Categories

- IT Ops

- Cloud

- DevOps

- Home Ops

- Information Security

- Software Development

## Site

- Home

- Tutorials

- Guidebooks

- Instructors

- Get Paid to Write

- Advertising

- Recommended Resources

- About Adam

        Copyright 2026&copy; ATA Learning | [Privacy Policy](https://adamtheautomator.com/privacy/)

                                                        Don't be left behind with the ATA Learning Newsletter!

Looks like you're offline!
