How to Flush DNS on Windows 10, 8, 7, & Mac?

How to Flush DNS on Windows 10, 8, 7, & Mac?

Do you face difficulties visiting certain websites or servers? If yes, you need to flush the DNS cache on your computer. If you have no idea how to do that, we will enlighten you. Therefore, in this blog, we are going to talk about how to flush DNS on Windows 10, Windows 8, or Windows 7 and Mac computers.

The blog has the focal point on the following ideas where we will be learning about the DNS cache in detail for Windows and Mac computers:

Learn about DNS Cache

Every time you visit a website by its domain name, your web browser requests the internet so that you can reach the website. In the meantime, it reads the IP address of that particular website. Later, it stores the location of the web servers that you access, you can also change the DNS server on Windows.

By storing the location, your browser helps you to access the website quickly when you visit the same website again. The local copy of DNS stores on your operating system as well.

However, users are unable to visit certain websites due to the broken or corrupted DNS cache. This happens when the website IP address changes in the future but the DNS cache has the old IP address as it was recorded earlier. As a result, you fail to access a specific website.

If your DNS Cache Spoofing and Poisoning, you should flush the DNS cache immediately. By flushing Windows DNS cache helps your PC communicate well with the host.

Know the Types of Caches on Windows

On Windows PC, you can find three types of cache which are as follow:

  • DNS Cache
  • Memory Cache
  • Thumbnail Cache

By clearing the DNS cache, you can solve internet connectivity issues. For instance, if you fail to reach the server, you can try clearing the DNS cache.

Besides that, if you remove the Memory Cache, it helps to clear the system memory. To free up some space on your hard disk, clearing the Thumbnail Cache can help.

How to Check Current DNS Cache?

It is important that you check the current DNS cache before clearing it. Now, this can be done via the Control Panel. Below are the steps that you can follow to see the DNS cache on Windows PC.

  • Launch “Command Prompt” on your computer.
  • Enter the command specified below:
    • ipconfig /displaydns
how to flush dns windows 10

Once you execute this command, it starts producing long output. Thereafter, you can view the dns.txt files generated on the Desktop. Here, you can check the entries.

Tip: To redirect to a file, you can use the following command to check the current DNS cache:

ipconfig /displaydns >%USERPROFILE%\Desktop\dns.txt

Now that you have checked your current DNS cache, you can clear the DNS cache to repair the corrupted DNS cache. For that, you can continue reading the procedure of DNS flush on Windows 10, 8, or 7.

The Procedure of Windows Flush DNS Cache

Windows PC users can perform different methods to flush DNS cache. Here, we will enlighten you on how to flush DNS cache or clear cache on Windows 10, 8, or 7 using command lines

The process of clearing the DNS cache on Windows PC is quite similar in all these methods. The only difference is the tool and command you are using for your Windows version. Go through the following methods to understand better.

How to Flush DNS Cache on Windows 10?

To clear the DNS cache, you can follow different kinds of ways. For instance, you can use execute commands using the Run dialog box or Command Prompt. Besides that, you can run PowerShell to execute the command. Let’s understand how to flush DNS using command on Windows 10.

Method 1: Run Windows Command

The first method enlightens you about running the Windows command through a Run dialog box. Here are the steps to flush DNS using command on Windows 10.

  • Press the “Windows” + “R” keys on your keyboard. This will launch the “Run” box.
  • Type “ipconfig /flushdns” in the text field.
  • Press the “Enter” key or click the “OK” button.

Once you are done following these steps, the command will clear the DNS Resolver cache in a very short time.

Method 2: Launch Command Prompt

The command we are using in this method is the same as the above one. The only difference is that we are using the Command Prompt window to execute the command.

  • Press the “Start” button.
  • Search for “Command Prompt” and launch it when it appears in the result. Make sure you run it as an administrator.
  • In the “Command Prompt” window, type the following command:
    • “ipconfig /flushdns”.
  • Hit the “Enter” key.

When you execute this command, it starts processing and the DNS cache will be cleared. Then, you can try visiting websites.

Method 3: Use PowerShell

This method covers the PowerShell tool using which you can run a DNS flush command on Windows computers.

  • Press the “Start” button.
  • Search for “PowerShell” and launch it when it appears in the result.
  • In the “Windows PowerShell” window, type “Clear-DnsClientCache”.
  • Hit the “Enter” key.
Clear-DnsClientCache - windows flush dns

By following these steps, the DNS cache will be cleared successfully. So, this is how you can flush DNS on Windows 10 computers in three different ways.

How to Clear DNS Cache on Windows 8 or 8.1?

Those who own Windows 8 or 8.1 can also flush DNS cache on their computer. For that, you can launch Command Prompt and execute a number of commands. Let’s know the procedure of Windows flush DNS cache in the following steps:

  • Right-click on the “Start” menu.
  • Select the “Command Prompt (Admin).
  • Click on the “Yes” if it prompts you to allow CMD to make changes to the PC.
  • Enter the following commands one after one. Make sure you hit the “Enter” after adding each command.
    • “ipconfig /flushdns”
    • “ipconfig /registerdns”
    • “ipconfig /release”
    • “ipconfig /renew”
    • “netsh winsock reset”

After adding commands, you can restart your computer. By doing so, the DNS cache will be cleared from your Windows 8 or 8.1 computer.

Must Read: How to Fix DNS Server Not Responding Error on Windows 10 & 7?

How to Flush DNS on Windows 7?

If you are using a Windows 7 computer and wish to clear the DNS cache, you can do that easily. All you have to do is access the Command Prompt service and run the commands. Below are the steps you can use to flush DNS on Windows 7.

  • Click on the “Start” button.
  • Choose the “All Programs”.
  • Go to “Accessories”.
  • Click right on the “Command Prompt”.
  • Select “Run as administrator”.
  • Run the following commands one after one. Make sure you press the “Enter” after adding each command.
    • “ipconfig /flushdns”
    • “ipconfig /registerdns”
    • “ipconfig /release”
    • “ipconfig /renew”
    • “netsh winsock reset”

When done executing these commands, you can restart the device. These commands will successfully clear the DNS cache from your Windows 7 PC.

In case you want to clear DNS cache on Windows XP or Vista, you can do it by launching the Command Prompt window. For that, you can follow the above-mentioned steps and run (ipconfig /flushdns) command.

If the command runs successfully, it shows a confirmation message on your screen saying DNS Resolver Cache Successfully Flushed. In case, you receive a message saying Action Requires then you can connect with the administrator to complete the procedure.

These are the steps for how to flush DNS on Windows 10, Windows 8, or Windows 7 computers. To know about Mac DNS cache, you can continue reading.

The Procedure of Clearing DNS Cache On Mac

If you own a Mac computer or laptop and wish to clear the DNS cache then the upcoming details are for you. Those who use macOS version 10.10, OS X 10.7 – 10.9, or OS X 10.6 and older can run the command lines to get the job done.

Must Read: How to Clear Cache and Cookies on Safari?

Below we will show you a step by step guide and you can follow the commands based on your macOS version. Make sure you close all the browser windows before performing commands.

  • Click on the “Applications”.
  • Go to the “Utilities”.
  • Click on “Terminal”.
  • Now, based on the macOS version, you can run the following commands:
  • For macOS X 10.10 (Yosemite), execute the command specified below:
    • sudo discoveryutil mdnsflushcache
  • OS X 10.7 – 10.9 (Mavericks, Mountain Lion, and Lion)
    • sudo killall -HUP mDNSResponder
  • OS X 10.6 and older
    • sudo dscacheutil -flushcache
  • Hit the “Enter” key.

This will clear the DNS cache on your Mac computer. In case, these steps do not help to clean the cache then you might have to run the power cycle. Here are the steps for that.

  • Power off your Mac computer.
  • Power off your router and modem (if you have it). Then, wait for at least 15 seconds.
  • After that, plug your modem in and wait for at least 1-2 minutes.
  • Then, plug your router in and wait for at least 1-2 minutes.
  • Lastly, turn on your computer.

This is the simple procedure of clearing DNS cache on Mac PCs. All you have to do is check your OS version and execute commands accordingly.

Summing Up

In this guide, we have talked about DNS cache (in general), types of DNS cache, and how you can check the current DNS cache so that you can flush DNS on Windows 10. DNS cache can be flushed just by executing the command lines.

Here, we have provided you different ways to clear DNS cache based on your Windows and Mac version. If you are unable to access certain web pages then you just need to flush the cache by following the methods provided in this guide.

Apart from this, if you want to scan your system files on the disk then you can run CHKDSK on your computer. Learn how to run CHKDSK on Windows 10 in detail.

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments