06 August, 2025

How to Flush DNS Cache on Windows 10 and 11 in a Few Steps

Quick summary: The fastest way to clear the DNS cache on Windows 10 and 11 is to open Command Prompt as administrator and run ipconfig /flushdns. You can also type the same command into the Run dialog (Windows + R), or use PowerShell with clear-DnsClientCache. To reset the whole network stack, run netsh winsock reset in an admin CMD. For Chrome or Edge, go to chrome://net-internals/#dns and click Clear host cache to remove the browser's own DNS records.

The DNS cache stores information about websites you have visited, which shortens page load time on later visits. Over time, though, it can become corrupted or hold outdated or incorrect data, causing unstable connections, sites that will not load, or unusually slow browsing. So how do you fix it effectively? Right now, MONA Media will show you how to clear the DNS cache quickly on Windows 10 and 11.

7 ways to clear the DNS cache on Windows 10 and 11

There are many ways to clear the DNS cache on Windows. Depending on your goal and technical comfort, you can choose the one that suits you. Here are 7 common, easy methods you can use right away on Windows 10 and 11.

Clear the DNS cache with a batch file

By setting up a batch file, you save time every time you need to clear the cache. This is a very convenient way to clear the DNS cache, especially if you often work with networks or test connections.

Step 1: Right-click on the desktop and choose New => Text Document to create a new text file. A new file will appear on the desktop. Name it (for example: Flush DNS), then press Enter.

Choose New and Text Document to clear the cache with a batch file

Step 2: Open the file you just created, then paste the command “ipconfig /flushdns” into the text window.

Enter the command to clear the DNS cache with a batch file

Step 3: In the File menu, choose Save As (or press the shortcut Ctrl + Shift + S).

Step 4: In the section Save as type, choose All Files from the drop-down menu.

Choose Save as type and select All files

Step 5: Name the file with the extension .bat (for example: FlushDNS.bat) after the file name.

Step 6: Click Save to finish.

Clear the DNS cache from the Run dialog

If you want a quick way to clear the DNS cache without opening several tools, the Run dialog is the best option. It is especially handy when you want to refresh the DNS cache in just a few simple steps.

Step 1: Press the keys Windows + R to open the Run dialog. You can also press the Windows key, type "Run" in the search box, and press Enter.

Step 2: In the Open box, enter the command “ipconfig /flushdns” then click OK to clear the DNS cache on Windows 10 and 11.

How to clear the DNS cache using the Run dialog

How to clear the DNS cache with Command Prompt

One of the simplest and most effective ways to clear the DNS cache on Windows 10 and 11 is the Command Prompt command-line tool. Besides launching programs and configuring the network, it lets you clear the whole DNS cache with a single command. Follow these steps:

Step 1: Press the Windows key and type Command Prompt in the search box. When the result appears, choose Run as administrator to open it with admin rights. If a confirmation dialog appears, click Yes to continue.

Type Command Prompt and click Run as Administrator

Step 2: In the command window that opens, enter the command "ipconfig /flushdns" and press Enter. You will immediately see a message confirming that the DNS cache was cleared successfully.

Enter the command and press Enter to clear the DNS cache in Command Prompt

Clear the DNS cache with PowerShell

Clearing the DNS cache with PowerShell is similar to Command Prompt, as follows:

Step 1: Open PowerShell as administrator, the same way as for Command Prompt.

Step 2: Type the command "clear-DnsClientCache" and press Enter to clear the DNS cache.

How to clear the DNS cache with PowerShell

Clear the DNS cache by resetting Winsock

Winsock (Windows Sockets) is an important programming interface in Windows that handles network requests between the system and applications. When you reset Winsock, the system also refreshes several network components, including the DNS cache. Here is how to clear the DNS cache with Winsock:

Step 1: Press the Windows key and type Command Prompt in the search box, then choose Run as administrator from the right-hand column. When the UAC confirmation dialog appears, click Yes.

Step 2: In the command window that opens, enter the command “netsh winsock reset”, then press Enter. If you see the message "Winsock reset completed successfully”", just restart your computer to apply the change.

Clear the DNS cache by resetting Winsock

How to refresh the DNS cache with Registry Editor

This setup makes the system clear the DNS cache automatically at set intervals (for example every 24 hours). Because it involves editing the Registry, back up your data before following the steps below to avoid risking the system.

Step 1: Press the Windows key and type Registry Editor in the search box, then click Run as administrator. You can also press the key combination Windows + R => type regedit.exe => press OK to open Registry Editor.

Type registry editor and choose Run as administrator

Step 2: In the Registry Editor address bar, enter the following path:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesDnscacheParameters

Enter the hkey_local_machine path in Registry Editor

Step 3: In the folder Parameters, right-click and choose New, then choose DWORD (32-bit) Value. 

Choose New, then choose DWORD 32-bit Value

Step 4: Name the new value MaxCacheTtl.

Name the value maxcachettl

Step 5: Double-click MaxCacheTtl, then enter the value 86400 go to the Value data and press OK.

Enter 86400 and click OK

Step 6: In the folder Parameters, create another new value and name it MaxNegativeCacheTtl.

Create a new value in Registry Editor and name it maxnegativecachettl

Step 7: Double-click the MaxNegativeCacheTtl value you just created, then enter 5 in Value data and press OK.

Enter 5 and click OK to finish clearing the DNS cache with Registry Editor

Step 8: Restart your computer for the changes to take effect. After this setup, your computer will refresh the DNS cache automatically every 86400 seconds (24 hours).

How to clear the browser's DNS records

Web browsers such as Google Chrome and Microsoft Edge store DNS records to speed up site access. Over time, though, these records can become corrupted or outdated, leading to slow loading, wrong addresses, or pages that do not respond.

To keep your browser running smoothly, clear the DNS cache regularly with the steps below:

Step 1: Open Chrome or Edge, paste the matching command into the address bar, and press Enter:

  • Chrome: chrome://net-internals/#dns
  • Edge: edge://net-internals/#dns

You will be taken to the browser's internal network management page.

Enter the matching command in Chrome or Edge

Step 2: On this page, click the “Clear host cache” to clear all saved DNS records.

Click Clear host cache to clear the DNS cache

When you are done, the DNS cache in your browser is cleared. It is a simple but effective fix for browsing problems.

You may also be interested in: How to clear cache – clear cache in every browser

How to view your computer's current DNS cache

If you want to see the DNS records currently stored on your computer, follow these steps:

Step 1: Press the Windowskey, type Command Prompt, then choose Run as administrator in the right-hand pane. 

Step 2: In the command window, type the command “ipconfig /displaydns” and press Enter to see your computer's current DNS cache.

How to view the current DNS cache

Common questions after clearing the DNS cache

Does clearing the DNS cache harm a Windows computer?

Nothing to worry about. Clearing the DNS cache is a safe step, commonly used to fix web access problems. In rare cases, though, users may see slow access, security errors, or be unable to open certain websites.

Do you have to restart after clearing the DNS cache?

Usually, users do not need to restart the computer after clearing the DNS cache, because the changes take effect immediately. If you want to make sure all network processes run stably, you can still restart your Windows computer.

Clearing the DNS cache is a simple step that clearly improves your network connection and computer performance. With the 7 simple ways to clear the DNS cache shared above, you can do it yourself at home without calling a technician. Save this article for whenever your computer slows down or cannot reach a website!

See related articles: what DNS 1.1.1.1 is? How to change DNS to 1.1.1.1 to speed up your internet

FAQ

What is the command to clear the DNS cache on Windows?
The command to clear the DNS cache on Windows is ipconfig /flushdns, run in Command Prompt opened with Run as administrator. In PowerShell, use the clear-DnsClientCache command.
Do you need to restart the computer after clearing the DNS cache?
Usually no, because the change takes effect immediately. However, if you reset Winsock (the netsh winsock reset command), you need to restart the computer to apply the change.
About The MONA Group: Founded in 2016, with 60+ staff, MONA has delivered 14,000+ projects with an 85% client retention rate. MONA provides website design, full-scope SEO, custom software and AI automation solutions for businesses. Consultation hotline: 1900 636 648. Explore MONA AI Agent suite and MONA SEO services.
MONA has a podcast: listen instead of readingEpisodes on AI, automation & SEO for Vietnamese businesses
Nghe ngay
About the author

CEO & Founder · The MONA

The founder of The MONA built a service company of 60+ staff with 14,000+ projects delivered. Khánh Hùng shares his thinking on building self-running systems, automating a business, and the real lessons behind MONA's projects.

Views 1,5K
Rate this article 4,9/5 · 17 ratings

Professional website
design services

Own a website with a beautiful, 100% exclusive design and a lifetime warranty, with the ability
to expand features flexibly as your business grows, starting today!

Contact Mona

    MONA có riêng một Người "Bạn Thân" cho bạn - Người Account sẽ đồng hành, hỗ trợ, hướng dẫn, đặt đồ ăn cho bạn mãi mãi, từ đây về sau!
    MONA will never sell your information or send you spam
    The MONA team advising on an online education management system
    Hỏi đáp giáo dục 4.0
    Tạo cuộc hẹn miễn phí với MONA để giải đáp và tư vấn mọi thắc mắc về giải pháp số hoá ngành giáo dục
    Thời lượng cuộc hẹn
    45 Phút
    Ngày và giờ
    Thứ 2, ngày 25 tháng 12, 2023
    [9:30 - 10:15]

      Chọn ngày và giờ
      Khung giờ
      Back
      Hãy cho MONA biết bạn là ai
      0:00