6 Easy Ways to Flush DNS Cache on Windows 11 and 10

Have you ever had trouble accessing a website or service and wondered why it wouldn’t load? This can sometimes be caused by an outdated DNS cache, which stores previously visited website addresses. Fortunately, clearing the DNS cache is a simple solution to these problems. In this article, we will show you how to clear the DNS cache on Windows 11 and 10.

How to Clear DNS Cache

Before we continue, it is essential to understand what a DNS cache is. Basically, DNS cache is a feature that stores information about your recently visited websites and acts as a temporary database to speed up the browsing experience.

However, if the IP address of a website changes, your computer may still try to access the old address due to cached DNS information. You may get an error when you try to access the website. Therefore, to fix this, you must clear the DNS cache. Let’s show you how.

1. Clear DNS Cache with Command Prompt

The command prompt allows you to perform a variety of functions, including launching programs, managing network settings, performing system administration tasks, troubleshooting common computer problems, etc. including clearing the DNS cache on the Windows machine. Follow the steps below.

Step 1: Press the Windows key on your keyboard, type Command promptand click ‘Run as administrator.’

In the prompt, select Yes.

type Command Prompt

Step 2: Type the following command and press Enter.

ipconfig /flushdns
Enter the command below

You will then see a message stating that the DNS resolver cache has been cleared. If this method fails, you can check the following method.

2. Using Windows PowerShell

PowerShell is no different from Command Prompt. Even PowerShell offers many functions and clearing the DNS cache is one of them. Follow the steps mentioned below to do so.

Step 1: Press the Windows key on your keyboard, type PowerShelland click ‘Run as administrator.’

See more:  8 Ways to Open Local Security Policy in Windows 10 and 11

In the prompt, select Yes.

type PowerShell

Step 2: Type the command below and press Enter.

Clear DnsClientCache
Enter the command below

That’s it. With this, the DNS cache will be cleared easily. Check the next method if you don’t want to access the command line terminal but want to clear the DNS cache.

3. Use Run

For this method we will use the Run window. Considering the above two methods, this seems easier. Follow the instructions below.

Step 1: Press ‘Windows Key + R’ on your keyboard to open the Run dialog box.

Note: Alternatively, press the Windows key on your keyboard and type Run.

Press 'Windows Key + R' on your keyboard

Step 2: Enter the command below in the text field and click OK.

ipconfig /flushdns
press OK

You’ll see a command prompt in a snap and your DNS cache will be cleared. If you are not looking for a one-time solution but want to access the functionality whenever you want quickly, move on to the next method.

4. Use batch files

Setting up a batch file is very useful if you want a one-click solution to reset DNS whenever you need it. Follow the instructions mentioned below.

Step 1: Right-click on the desktop, select New from the context menu, and select Text Document.

select Text Document

Step 2: Name the file and press Enter key on your keyboard.

Example: Clear DNS

Name the file

Step 3: Enter the command below.

ipconfig /flushdns
Enter the command below

Step 4: Click the File menu and from the drop-down menu, click Save As.

Note: You can also save the file by pressing ‘Ctrl+Shift+S’.

Click Save As

Step 5: Click the ‘Save As’ drop-down menu and select All Files.

Click the 'Save As' drop-down menu

Step 6: Add the .bat extension to the file name.

Add the .bat extension to the file name

Step 7: Finally, click Save.

click to save

From now on, whenever you need to clear the DNS cache, you can simply double click on this batch file. If none of the above methods work for you, then the next method will.

5. Reset Winsock Settings

Winsock (Windows Sockets) is a programming interface that handles input/output requests for Internet applications in the Windows operating system. This includes refreshing the DNS cache from your Windows PC. Follow the instructions below.

Step 1: Press the Windows key on your keyboard, type Command prompt, and click ‘Run as administrator.’

See more:  How to View All Websites You Have Visited on Instagram

In the prompt, select Yes.

type Command Prompt

Step 2: Type the command below and press Enter.

reset netsh winock
Enter the command below

You will get a message that Winsock has been successfully reset. You must then restart your computer for the settings to take effect.

6. Automatically Refresh DNS Cache Using Registry Editor

This method is more complicated than the above method, but the steps and implementation are very simple. However, since we will be using the Registry Editor, we strongly recommend that you back up the Windows Registry before performing the steps below.

Step 1: Press the Windows key on your keyboard, type Registry Editorand click ‘Run as administrator.’

Note: Press ‘Windows Key + R’ to open Run dialog, type regedit.exeand then click OK to open Registry Editor.

In the prompt, select Yes.

type Registry Editor

Step 2: In the top address bar, enter the address in question.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters

Note: You can also navigate to this section manually.

enter the address in question

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

select 'DWORD (32-bit) Value'.

Step 4: Enter MaxCacheTtl in the name field.

Import MaxCacheTtl

Step 5: Double click on MaxCacheTtl, type 86400 in the Value Data field and press OK.

type 86400 in the Value data field

Step 6: In the Parameters folder, right click again, select New and select ‘DWORD (32-bit) Value.’

select New

Step 7: Enter MaxNegativeCacheTtl in the name field.

Import MaxNegativeCacheTtl

Step 8: Double-click MaxNegativeCacheTtl, enter 5 in the Value data field, and click OK.

Type 5 in the Value data field

Finally, reboot the system for the changes to take effect. And that’s it! When the system reboots, your Windows machine will automatically clear the DNS cache every 86400 seconds or 24 hours.

How to Clear Your Browser’s DNS Records

To improve search speed, browsers cache DNS. Since each browser stores the details, they need to be deleted separately. Follow the steps below.

Step 1: Launch Google Chrome or Edge, enter the address below and press Enter.

chrome://net-internals/#dns edge://net-internals/#dns

This will take you to Chrome or Edge’s intranet page.

Enter the address below

Step 2: Click the ‘Clear Server Cache’ button.

Click the 'Clear Server Cache' button

With that, you have successfully cleared the DNS cache from your preferred browser. Continue reading if you want to reset the DNS cache at a set time over a specific time period.

See more:  How to Open the First Rune Chest in God Of War Ragnarok

Now that you have cleared your DNS cache, you may want to take a look at your current DNS cache. Move on to the next method.

How to view the current DNS cache

Step 1: Press the Windows key on your keyboard, type Command promptand click ‘Run as administrator.’

In the prompt, select Yes.

type Command Prompt

Step 2: Type the command below and press Enter.

ipconfig /displaydns
Type the command below and press Enter

Your go. This will display your current DNS cache data. If you have any questions, check out the FAQ section below.

Flushing DNS Cache FAQ on Windows

1. Is clearing the DNS cache risky?

No, clearing the DNS cache is a relatively safe operation commonly used to resolve DNS-related problems. However, there are a few risks, such as slow performance, security risks, website access issues, etc.

2. Do I need to restart after clearing DNS?

For the most part, you don’t need to restart your computer after clearing the DNS cache. When you run the flush cache command, the changes take effect immediately. However, if you need to make sure DNS-related processes are running properly, restart your computer.

Clear DNS cache

Whether you’re experiencing slow internet speeds or browsing errors, knowing how to clear the DNS cache can help solve the problem.

With the step-by-step instructions in this article, you can quickly refresh your Windows DNS cache and return to your web browser without interruption. You may also want to read how to change DNS servers on Android and iPhone.

Categories: How to
Source: thpttranhungdao.edu.vn/en/

Rate this post

Leave a Comment