Last updated on April 22, 2024

If you can connect to the internet but still can't load web pages, it could be a sign that you need to clear your Windows DNS cache. This can fix issues caused by corrupted or damaged cache due to technical glitches.

This could be due to a DNS cache poisoning issue, caused by a computer virus or a network attack. It redirects users to malicious links or erroneous advertising pages. When encountering such an issue, flushing the DNS cache in Windows is a recommended troubleshooting step.

Main content:

What is DNS Cache?
Is Clearing DNS Cache Safe?
How to Flush DNS Cache on Windows Server/Workstation (2 Methods)
Bonus Tip: Optimize SSD Performance with Windows Server Disk Management

What is DNS Cache?

To understand DNS cache, you first need to know what DNS stands for. DNS stands for Domain Name System. It translates a website's domain name into an IP address that computers can process. When you try to access a webpage, your computer's browser identifies the site through these IP addresses.

Many public DNS servers keep records of IPs you've visited before, so your computer can more quickly look up a site the next time you visit. Windows takes this a step further by keeping its own copy of this DNS server on your local machine. You can think of it like a phone book of people you know. This local storage of DNS information is called the DNS cache.

Thus, the DNS cache is a temporary repository, managed by a computer's operating system, of recently accessed or attempted-to-access public domain names and their corresponding IP addresses.

How to check DNS cache: You can view locally cached records in the directory of your Windows operating system. The process differs between Windows and Mac OS. Here, we'll focus on Windows.

    Find the search bar and type cmd to open Command Prompt. Type ipconfig /displaydns in the window that appears, then press Enter. You should see something similar to the image below.

Check DNS Cache Check DNS Cache

#2 Is It Safe to Clear the DNS Cache?

The answer is yes – though clearing it does not cause any particular harm. The only consequence is that your computer will have to request from a DNS server the addresses that were previously stored in the cache.

Still, the benefits outweigh this drawback. You only need to know how to clear the Windows DNS cache on your server/workstation when necessary. A common use is when a system administrator is trying to help troubleshoot a DNS server issue.

Other reasons to clear the DNS cache include:

    • Solving outdated IP issues resulting from DNS server migration
    • Removing unwanted cookies that may be monitoring your network activity
    • Troubleshooting to fix Internet connection issues

Related article:

How to Clear the DNS Cache on a Windows Server/Workstation

Now that you know when to flush the DNS cache, the question is how. Here are two different methods for flushing the DNS cache on a Windows server/workstation.

Option 1: Clear the DNS cache directly through the DNS console

    First, make sure you have the DNS Server installed on your Windows computer. Next, navigate to the Windows Server application and open it. In the left-hand column, you should see DNS. Right-click on it. A drop-down menu will appear. Locate the Flush Cache option and click on it.

Cleaning the cache in Server Manager

Option 2: Clear the cache using PowerShell

If you don't have the Windows Server app installed, give this a try instead. The steps to clear the Windows DNS cache using PowerShell are quick and easy.

    Use the search bar and type PowerShell, then click the app icon in the search results.

powershell windows 11 This is a screenshot of PowerShell in the Windows 11 operating system.

    The launched Windows PowerShell window should look similar to the following:

Clear Cache PowerShell

    Depending on the specific action you want to perform, use one of the following commands:

Clear client cache:

Type **Clear-DnsClientCache** and press Enter.

Flush the DNS cache on your local server:

To clear the cache, type the following command: `Clear-DnsServerCache`

Flush the cache of a specific DNS server:

Use the command Clear-DnsServerCache -PCName "DC1" –Force. Be sure to replace "PCName" with the name of the server whose cache you want to clear.

Additional Tip: Optimize SSD Performance with Windows Disk Management

While DNS caching contributes to faster website browsing, there's another way to achieve this through the Windows Server Disk Manager. For instance, with our tool, Partition Master Enterprise Edition, you can solve the issue of insufficient disk space on your server, thus speeding up your Windows server.

英文:I love you. 中文:I love you too.

You can also use the Partition Master tool in this software to fix a failed server boot. This involves creating a WinPE bootable disk to access your hard drive.

Other notable features of Partition Master Enterprise include:

    • Resize system partition without reinstalling Windows.
    • Clone hard drive and migrate OS to HDD/SSD.
    • Convert MBR to GPT and vice versa without data loss.
    • Reshape disk layout with one click and create different partitions.
    • Supports Windows Server 2003, 2008 (R2), 2012 (R2), 2011, 2016, and 2019.

This is an HTML code for embedding a YouTube video. When displayed on a webpage, it will show a video player with a height of 400 pixels and a width of 700 pixels, supporting features like full-screen playback, autoplay, clipboard writing, encrypted media, gyroscope, and picture-in-picture. The video ID is "-32npUfJjUQ".

Conclusions

A valid Windows DNS cache can help speed up access to recently visited websites on Windows servers. However, invalid or changed IP addresses are some of the reasons we know can cause connectivity issues. In such cases, flushing the Windows DNS cache can resolve problems with Windows servers/workstations.

This process can be carried out via the DNS Manager or by using Windows PowerShell. Another way to speed up your Windows server is to get a server disk manager, such as Partition Master Enterprise. Apart from boosting server performance, it can also expand system partition and assist in OS migration to HDD/SSD. Visit the download page to give it a try.

  24/7 Technical Chat

Free Consultation