Uncategorized

How to clear your DNS cache?

While surfing on the internet, you might have landed on a wrong site or accidentally downloaded a corrupt file. There are many forms of computer viruses and they affect different software in a computer; they may corrupt your DNS cache which can create problems like you may be redirected to a different malicious site on trying to access certain domains. It becomes a necessity then to clear the DNS cache; the next time when you visit a webpage, new DNS records will get created and exploring the internet becomes uninterrupted and easy, again.  So, if you need to clear your dns read this:

For Windows installed computers

To clear your DNS cache in Windows systems, follow the following steps:

  • Open the ‘command prompt’ in your laptop/computer by looking it up on the start menu.
  • When the command prompt opens up type ‘ipconfig /flushdns’ in it and press enter.
  • The system will take a few seconds to clear up the cache and then the prompt will display a message saying, ‘Successfully flushed the DNS Resolver Cache.’

This completes the process of clearing your DNS cache in a Windows system and the next time you browse a webpage, DNS servers will provide the system with accurate and update IP mapping.

For MAC computers

For macOS Mojave (v10.14), follow the following steps:

  • Run the terminal.app on your desktop or laptop either through utilities, under applications or through pressing Command + Space.
  • First, type ‘sudo killall –HUP mDNSResponder’ in the app and then press Return on your keyboard.
  • Then, enter the administrator password and press Return.

On completion of the process, no notification as such will appear but the DNS cache must have been cleared if the steps were followed rightly. For older servers, different commands might be needed.

For Linux computers

Since they used specific DNS services, the command that will clear the cache is different, depending upon the type of service you have in your distribution and if has been enabled. Press Ctrl + alt + T, which will launch the terminal and input the following:

  • For local NCSD DNS caches, type in ‘sudo /etc/init.d/ncsd restart’ and enter the password if necessary.
  • For local dnsmasq DNS caches, type in ‘sudo /etc/init.d/dnsmasq restart’ and on completion, a response will appear. The terminal might ask for your password.
  • For local BIND DNS caches, type in ‘sudo rndc restart’ or ‘sudo rndc exec’ and enter the password, if it is required.

Hence, it clearing DNS is easy and will help in improving internet access and also making it safe.

Leave a Reply

Your email address will not be published. Required fields are marked *