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,
Visit the URL chrome://net-internals/#dns
Click on the “Clear host cache” button
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.
Step 2: In the command prompt, run the following command:
Step 3: Hit Enter. You will get a success message once the DNS cache is clear.
C) Clear DNS Cache Mac
Launch the Terminal App. You can find it in Applications>>Utilities>> Terminal
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.