How to Clear DNS Cache in Windows, Mac and Chrome

How to Clear DNS Cache in Windows, Mac and Chrome

Every once in a while you may be asked to clear your DNS cache. This is required to get the latest version of a website more so when the DNS changes. The DNS information is what tells a browser where to find a website. This information is stored on your computer in the cache. The problem is DNS cache can lead to problems more so when moving your WordPress website to a new domain name or to a new host. That is why you need to clear this cache.

Clearing DNS cache in Windows

To clear your DNS cache in windows you need to launch the CMD (command prompt) tool from the start button. You then need to type this line in the CMD:

ipconfig /flushdns

Hit enter to execute the command and you will flush the DNS cache. You can now visit your website for updated DNS information.

Clearing DNS cache in macOS

Clearing DNS cache in Mac is still as simple. The first thing you should do is launch the Terminal app. This is located in the Launchpad under ‘Other’ folder. You can also open it through the Finder and then go to Applications>>Utilities folder. Once it opens, type this command in it:

sudo killall –HUP mDNSResponder

Before the DNS cache is cleared you will need to enter your macOS password. This is the password you use to log into your computer. Thereafter the computer will flush the DNS cache and you can visit the website to get the latest DNS info.

Clear DNS cache in Chrome

As you may already know, Google Chrome also stores DNS cache. This cache is separate from the DNS cache that is stored on your computer. If you are using Chrome as the main browser, you have to clear the Chrome’s DNS cache. To do this enter this address into your address bar and hit enter:

Chrome://net-internals/#dns

The internal settings page of Google Chrome will load. Click on ‘Clear host cache’ button. Chrome will now clear the DNS cache.

It is good to remember that the DNS cache is separate from the browser cache. The browser saves website data in temporary cache to load pages fast. If you have any problem viewing the updated page even after clearing DNS cache you have to clear the browser cache as well.

DNS (Domain Name Server) is technology that tells your computer the IP address of an associated domain name. Saving the DNS information in the local DNS cache makes it easy for your browsers to find a website. With that in mind, you should not clear the DNS cache unless it is absolutely necessary.

Clear your DNS cache