06 August, 2025
How to Flush DNS Cache on Windows 10 and 11 in a Few Steps

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.
Step 2: Open the file you just created, then paste the command “ipconfig /flushdns” into the text window.
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.
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 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.
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.
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.
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.
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.
Step 2: In the Registry Editor address bar, enter the following path:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesDnscacheParameters
Step 3: In the folder Parameters, right-click and choose New, then choose DWORD (32-bit) Value.
Step 4: Name the new value MaxCacheTtl.
Step 5: Double-click MaxCacheTtl, then enter the value 86400 go to the Value data and press OK.
Step 6: In the folder Parameters, create another new value and name it MaxNegativeCacheTtl.
Step 7: Double-click the MaxNegativeCacheTtl value you just created, then enter 5 in Value data and press OK.
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.
Step 2: On this page, click the “Clear host cache” to clear all saved DNS records.
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.
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?
Do you need to restart the computer after clearing the DNS cache?
Related articles
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!































Free AI courses
AI tools at work
VI
EN


