How to refresh your local DNS cache

A DNS cache is a temporary database, maintained by a computer’s operating system, that contains records of all the recent visits and attempted visits to different websites. In other words, a DNS cache is just a memory of recent DNS lookups that your computer/device can quickly refer to when it’s trying to figure out how to load a website.

This refresh of the local DNS will not affect your computer or websites in any way. It will be helpful in these cases:

  • Not being able to access the website with your browser
  • Old/wrong version of your website is loaded in the browser
  • Not being able to access your mailbox using a mail client (Outlook/Mac Mail)
  • Not being able to access the HostPapa network at all

Below are listed most commonly used OS (Operating Systems) and steps on how you can flush your DNS cache for your computer/device:

Microsoft Windows      

Windows 10

Flushing the DNS cache on Windows 10 is a very easy process.

  1. Ensure that you’re on the Windows 10 desktop.
  2. Right-click on the Start Menu and choose Command Prompt (Admin) from the menu.
  3. Type in the command ipconfig /flushdns and hit Enter.

Older versions of Windows

  1. Click the “Start Menu” button.
  2. Simply type cmd in the Windows search bar
  3. Open the cmd (command line for Windows)
  4. Type in the command ipconfig /flushdns and hit Enter

Apple OS X

  1. Open up a command terminal.
  2. Run the command: sudo killall -HUP mDNSResponder
  3. If that doesn’t work you can try with the following commands:
sudo discoveryutil udnsflushcaches

sudo dscacheutil -flushcache

sudo lookupd -flushcache

Linux

NSCD – Name Server Cache Daemon

If you are running the nscd Name Service Cache Daemon and wish to flush your DNS cache, then you will need to do the following:

  1. Open up a command terminal.
  2. Run the command:
    /etc/init.d/nscd restart

systemd

(software suite that provides an array of system components)

If you are running a system that uses systemd, in order to flush your DNS cache then you will need to run the following:

  1. Open up a command terminal.
  2. Run the command:
    systemd-resolve --flush-caches
  3. Optional: You can verify that this ran correctly by running the command:
    systemd-resolve --statistics

Was this article helpful?

Related Articles

Leave A Comment?