How to Clear DNS Cache on Windows 10 [5 Different Ways]

Our experts verified & tested all of the solutions in this article

Reading time icon 5 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

Key notes

  • Your webpages will fail to load if your DNS cache is corrupt, thus, you will need to flush it.
  • Generally, it's required to have administrator rights in order to do this, but there's a way around it.

The main job of DNS is to translate website names into IP addresses so your computer can understand and perform the required actions.

DNS converts every website that you visit. However, this request may not be complete if the website name or hostname isn’t converted to an IP address. In such a case, you will encounter issues where the web page won’t load.

How to flush DNS in Windows 10?

1. Use Command Prompt

  1. Open the Start menu. Search for Command Prompt and open it.
  2. Type the below command and press Enter: ipconfig /flushdns
  3. The Command Prompt will show a message saying Successfully flushed the DNS Resolver Cache. Close the window afterward.

The above process does not require you to open the Command Prompt as an administrator. This is the simple answer to the question: How do I force flush DNS?

2. Use the Run dialog

  1. Press the Win + R buttons to open the Run dialog. Type the below command and press Enter:ipconfig /flushdns
  2. Your screen will blink as if nothing happened, but the DNS cache is cleared in that small moment.

3. Use PowerShell

  1. Open the Start menu. Search for Windows PowerShell and open it.
  2. Type in the below command and press Enter: Clear-DnsClientCache
  3. A message will show up in the Windows PowerShell saying, Successfully flushed the DNS Resolver Cache.

In this method, you do not need to open the Windows PowerShell and run it as an administrator. Simply enter the command, and DNS will be flushed.

4. Restart the DNS client

  1. Open the Start menu. Search for services and open it.
  2. Locate the DNS client and right-click on it to select Refresh.
  3. After a few seconds, the DNS client will complete the process and flush DNS in Windows 10. Close the services window and restart your PC.

For some Windows 10 users, refreshing the DNS client under the services app doesn’t work. Because the option is greyed out.

Besides, this is an advanced method, and we wouldn’t recommend you do anything extreme to flush DNS in Windows 10. You can follow the above methods if the DNS client option is greyed out.

5. Use a batch script

  1. Open the Start menu. Search for Notepad and open it.
  2. In the blank notepad, paste the below text: ipconfig /flushdns
  3. Save the file by clicking on File and Save As. Name the file flushdns.bat or anything of your choice, but do remember to end the file name with .bat extension.
  4. Select All files from the File type drop-down menu. Press OK.
  5. Open the location where you have saved the DNS batch file and double-click on it.
  6. This will flush the DNS cache on your Windows 10 PC.

How can I view my current DNS cache in Windows 10?

There are chances that the DNS cache is corrupt, which is the reason for the web page not loading. Moreover, this also prevents your PC from communicating with the host properly.

Also, the IP address of a website may change, and if you are trying to access the old IP address, you will also come across certain issues. So, it is best to flush DNS in Windows 10 to resolve all such errors.

But before we do that, there is a simple way via which you can view your current DNS cache in Windows 10:

  1. Open the Start menu. Search for Command Prompt and open it.
  2. Type the below command and press Enter: ipconfig /displaydns
  3. You will see a long list of details in the Command Prompt.
  4. Well, that will not be a convenient way of looking at your DNS cache. To simplify this, you can type the below command and hit Enter: ipconfig /displaydns >%USERPROFILE%\Desktop\dns.txt
  5. The above command will create a text file of the DNS cache and will be saved on your desktop. You can open the text file and view your current DNS cache.

The obvious question is can you flush DNS without admin? The short answer is yes, and you will see how you may do that using the methods below.

While you can follow the above safe methods to flush DNS in your Windows 10 PC, you should have at least some knowledge about what you are dealing with.

Although DNS cache stores information about the websites, there are some other important details that it holds onto.

  • Resource data: This contains information about the host or IP required to convert a web address to a numerical address and reverse it.
  • TTL: Time to Live (TTL) contains the validity record counted in seconds, which is the expiry date of the cached data, after which they expire.
  • Class: These are the different groups of the protocol, and there are many groups under a Class.
  • Record name: The name of the DNS information of the host.
  • Resouce data length: It is the length of the range of the resource data.
  • Record type: It contains information about the IP address, such as IPV4 or IPV6.

Now comes a question about why you should flush DNS on your computer. The answer to this is mentioned below:

  • To prevent DNS spoofing, i.e., if someone is trying to gain access to your DNS cache to redirect you to the wrong websites.
  • You have come across the in-famous 404 error, which would come up if the website you are visiting has been moved to a new address.
  • The website you want to visit isn’t opening or shows some error quickly after opening.
  • Flushing DNS could help you keep your browsing behavior private.

These methods will help you flush DNS in Windows 10 without requiring admin rights or privileges, along with some important information regarding DNS.

However, if because for any unknown reason, you come across issues clearing DNS, you can always check out our guides on how to fix DNS issues on Windows 10/11.

If you have any other questions or suggestions, feel free to use the comments section below.

More about the topics: administrator account, DNS, windows 10

User forum

0 messages