Knowledgebase

Search

How to Clear the DNS Cache on Your Computer

Troubleshoot internet connectivity by clearing the DNS cache on your computer. Step-by-step instructions for Windows, macOS, and Linux systems.
Table of Contents

This article explains the steps to clear the DNS cache on your computer.

Clearing the DNS cache on your computer is an essential task to troubleshoot and resolve internet connectivity issues. The DNS cache stores the IP addresses of the websites you visit, so clearing the cache can help resolve errors and speed up the loading of websites. In this article, we’ll show you how to clear the DNS cache on Windows, macOS, and Linux systems.

 

Clearing DNS Cache on Windows

There are two methods to clear the DNS cache on a Windows computer: using the Command Prompt or using the Windows Power Shell.

Method 1: Using the Command Prompt

  1. Press the Windows key + X and select Command Prompt (Admin) from the menu.
  2. Type the following command in the Command Prompt window and press Enter:       ipconfig /flushdns
  3. You should see the following message: “Successfully flushed the DNS Resolver Cache.”

Method 2: Using the Windows Power Shell

  1. Press the Windows key + X and select Windows Power Shell (Admin) from the menu.
  2. Type the following command in the Windows Power Shell window and press Enter:      Clear-DnsClientCache
  3. You should see the following message: “DNS client cache cleared.”

 

Clearing DNS Cache on macOS

Clearing the DNS cache on a macOS computer can be done using the Terminal.

  1. Open Terminal (press Command + Space, type Terminal, and press Enter).
  2. Type the following command in the Terminal window and press Enter:        sudo dscacheutil -flushcache
  3. Enter your administrator password when prompted.
  4. You should see the following message: “Cache flushed.”

 

Clearing DNS Cache on Linux

The process to clear the DNS cache on Linux systems varies depending on the distribution you’re using. Here are some of the most common methods:

Method 1: Using the Terminal

  1. Open Terminal.
  2. Type the following command in the Terminal window and press Enter:      sudo /etc/init.d/nscd restart

Method 2: Using the systemd

  1. Open Terminal.
  2. Type the following command in the Terminal window and press Enter:      sudo systemctl restart NetworkManager

Google Chrome browser

The Google Chrome browser keeps a DNS cache of its own. To clean it, follow these instructions:

  1. Open Google Chrome.
  2. In the address bar, enter chrome://net-internals/#dns. This will display a list of hosts in Google Chrome’s internal DNS cache.
  3. Click “Clear host cache.”
  4. In the address bar, enter chrome://net-internals/#sockets.
  5. Click “Close idle sockets” and then “Flush socket pools.”

 

Conclusion

Clearing the DNS cache on your computer is a quick and simple process that can help resolve internet connectivity issues. Whether you’re using Windows, macOS, or Linux, the steps to clear the cache are straightforward. If you experience any issues with your internet connection, clearing the DNS cache is a good place to start troubleshooting.

Leave Your Comment