How To Clear DNS Cache On Major Operating Systems

SkyStra
May 7, 2020

Every domain name is linked to an IP address, and DNS (Domain Name System) is what makes it possible by acting as a sort of a phone book for the internet. 

When you input any URL (for example, skystra.com) into your browser – DNS automatically does the linking for you behind the scenes and brings the website up! 

DNS also stores all recently visited IP addresses locally on your computer, which is known as DNS cache, which can be a problem if DNS records become out of date or something changes on the website.

In this article, we’ll teach you how to clear your DNS cache on all major operating systems.

Clearing DNS cache On Windows OS

To clear DNS cache on Windows, please follow these steps:

1) Click on the Start menu by pressing the Windows key on your keyboard and type CMD. The Start menu will automatically show you Command Prompt as an available option.

2) Launch the Command Prompt application and type the following command in it and press the Enter key after:

ipconfig /flushdns

3) You’ll see a result that shows you successfully flushed the DNS resolver cache.

Once this is completed – try to access the website you were having trouble with to test if it’s working correctly. 

Clearing DNS Cache On MacOS

To clear DNS cache on macOS, please follow these steps:

1) Press the CMD+Space keys on your keyboard to open Spotlight and type Terminal into the search window. Once found, press Enter to launch the Terminal application.

2) Type the following command in it and press the Enter key:

sudo killall -HUP mDNSResponder && echo macOS DNS Cache Reset

(You will need administrator privileges for this operation)

Once this is completed – try to access the website you were having trouble with to test if it’s working correctly. 

Clearing DNS Cache On The Chrome Browser

The Chrome browser DNS cache is different from operating system cache, so if you’re still having difficulties resolving an IP address or a domain – you can try clearing it as well.

To clear DNS cache in Chrome, please follow these steps:

1) Launch the Chrome browser and input following URL into the URL bar and then hit the Enter key:

chrome://net-internals/#dns

2) Click on the Clear host cache. button on the right frame.

Once completed – try to access the website you were having trouble with to test if it’s working correctly. 

How To Check If Your DNS Is Cached

To check if your DNS is cached, launch the Command Prompt or Terminal applications as explained earlier, depending on the operating system you use and type the following command:

nslookup domain.com

(replace domain.com with the domain you’re having problems with)

It will return an IP address your computer sees when it tries to resolve the domain in question. Next, go to the whatsmydns tool and type in the same domain and hit the Search button. If the result from multiple servers in the world differs from your result – it’s likely your DNS is cached.