fbpx

What is DNS Cache and why you should clear them

image source: keycdn.com

What Is DNS Cache?
“DNS cache refers to the temporary storage of information about previous DNS lookups on a machine’s OS or web browser. Keeping a local copy of a DNS lookup allows your OS or browser to quickly retrieve it and thus a website’s URL can be resolved to its corresponding IP much more efficiently. The basic function of different cache types is all more or less the same.” -keycdn.com

What happens if the website you frequently visited changes its IP address?
So, when you visit your favorite website, your computer will try to check your DNS cache if there is already a stored record on that domain, once determined, it will quickly load the record. If it happens that the owner of the website changes its hosting or the IP address the tendency is that your browser might pull up an old copy of the site from the old IP address or you will encounter an error in loading the website.

You will need to delete your DNS cache in order for you to load the site with the correct DNS record. Depending on your Operating system, here are ways how to clear your DNS cache.

 

Windows Machine

1.  Click the start button (windows key)

2. On the search box type “Command Prompt”

 

 

3. On the Command Prompt window type “ipconfig /flushdns and hit enter in your keyboard, this will delete all your saved DNS entry

 

 

4.  You will see a message in the result saying

“Windows IP Configuration

Successfully flushed the DNS Resolver Cache.”

5. The command “ipconfig /displaydns” will display your current DNS cache entry

MAC Machine

Depending on your Mac OS version, here are the commands:

> Mac OS El Capitan or newer, run sudo killall -HUP mDNSResponder
> Mac OS Yosemite, enter sudo discoveryutil udnsflushcaches
> Mac OS Lion, Mountain Lion and Mavericks, the command is sudo killall -HUP mDNSResponder
> Mac OS Snow Leopard, enter sudo dscacheutil –flushcache
> MacOS Leopard, run sudo lookupd –flushcache
> Mac OS Tiger, use lookupd –flushcache

1. Open your Mac Terminal

 

 

2. In the Terminal, type the command, refer to the above information

 

 

3. Provide your password and hit enter

 

 

Additionally, you can clear your DNS cache in your Google chrome. Here’s how:

 

1.  Type “chrome://net-internals/#dns” in your Google chrome address bar and hit enter key in your keyboard

2. Hit the “Clear host cache” button

 

 

Summary

DNS Cache is a very efficient way to avoid having to complete an entire DNS lookup every time you visit a website. Your machine will use the OS and browser cached DNS information until it expires or it is flushed.

Leave a Reply

    Contact Us


    I agree to receive other communications from DigitalMunchers.

    By clicking submit below, you consent to allow DigitalMunchers to store and process the personal information submitted above to provide you with the content requested.


    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.