The Easy Guide To Clear DNS Cache

Table of Contents

When you are troubleshooting certain errors that relate to the connectivity to your WordPress site, you may have come across the term “Flush DNS”. In simple words, it means to clear DNS cache. Errors like 504 Gateway Timeout or the DNS_PROBE_FINISHED_NXDOMAIN can be resolved by clearing DNS Cache. In this article, we will explain what DNS cache is and how you can clear DNS Cache on your system.

What is DNS Cache?

The internet is connected to IP addresses which are basically a string of numbers. Each string uniquely points out to a website. Now it would be difficult to remember a string of numbers for each website that you visit. The Domain Name System (DNS) solves this problem by maintaining an index of all public websites and their corresponding IP addresses.

When you visit a website, the browser sends a request to the server. The DNS then looks up for the IP address. Although there are numerous public DNS servers that your computer can use for DNS lookup, a simpler solution is to maintain a local copy of all recently visited IP addresses. This local copy is called DNS cache. DNS cache stores the IP addresses of all the websites that you visit.

Let’s see how we can clear the DNS cache.

A)  Clear DNS Cache Google Chrome

To clear the DNS Cache of Google Chrome,

  1. Visit the URL chrome://net-internals/#dns
  2. Click on the “Clear host cache” button
Clear DNS Cache Chrome

B) Clear DNS Cache Windows

Here is how you can DNS flush Windows 10.

Step 1: Open “Run” (Windows+R). Type “cmd” and click ok. This will open the command prompt.

Clear DNS Cache Run cmd

Step 2: In the command prompt, run the following command:

ipconfig /flushdns

clear dns cache windows

Step 3: Hit Enter. You will get a success message once the DNS cache is clear.

clear dns cache windows success

C) Clear DNS Cache Mac

  1. Launch the Terminal App. You can find it in Applications>>Utilities>> Terminal
  2. Copy the following command in Terminal and hit enter
 sudo killall -HUP mDNSResponder; sleep 2;  

Once you enter your password, your DNS cache will be cleared.

So this is how you can clear DNS cache for Google Chrome, Windows and Mac. You can also refer to our other Easy Guides to fix errors like the 504 Gateway Timeout Error, 404 Error , and the dreaded DNS_PROBE_FINISHED_NXDOMAIN error. Our Easy Guides offer quick fixes to nagging errors. Let us know how you liked this article.

Fully Managed WordPress Hosting

Nestify’s AWS powered dedicated CPU servers keep your sites fast, secure, and always up to date.

Want faster WordPress?

WordPress Speed Optimization

Try our AWS powered WordPress hosting for free and see the difference for yourself.

No Credit Card Required.