Loading...

Knowledge Base

Flush DNS

Sometimes, your computer saves the link between a website name and its IP address. If the website’s address changes, your computer might still use the old one it saved, which can stop you from reaching the correct site.

Jump to a Section:

What is DNS Caching?

Before learning how to flush DNS, you first need to know what the DNS cache is. The DNS cache is your computer’s operating system, browser, or router’s memory of the recent websites you’ve visited. It is like a temporary container of information (DNS records, IP addresses, and hostnames) that your computer or browser uses to access websites quickly. This way, it does not need to start going through the site's actual host server to load the information from there all over again every time you visit a website. DNS caching helps your browser load a website faster when you visit it again.

To clear your browser’s cache, please refer to this article: How do I clear my web browser's cache?

What Does DNS Flushing Do?

Please note that while DNS caching may seem very useful for ease of website access and less traffic, it has its disadvantages. Among them is a security vulnerability and incorrectly displayed website content. Clearing or flushing your DNS regularly will prevent these issues.

This article will give you the steps required to clear or flush your cached DNS.

How Do You Flush DNS in Different Operating Systems?

Microsoft Windows 10

  1. First, close the application you are using, like your web browser or email program. 
  2. Next, press the Windows logo key and the R key at the same time. This opens the Run window. 
  3. Type cmd into the box and click OK.
  4. When the black window opens, type this command and press Enter:
    ipconfig /flushdns
  5. Finally, reopen your browser or email program.

Microsoft Windows 8

  1. First, close the program you are using, like your web browser or email app. 
  2. Next, press the Windows Logo key and the R key at the same time. This opens the Run window. 
  3. Enter cmd in the box, then click OK.
  4. When you see a black window, type the command below and press Enter:
    ipconfig /flushdns
  5. Finally, open your browser or email app again. 

Microsoft Windows Vista and Windows 7

  1. Save your work and close any open programs, such as your web browser or email. 
  2. Click the Start button, open All Programs, go to Accessories, and select Command Prompt.
  3. Right-click Command Prompt and choose Run as Administrator.
  4. When the black window appears, type the following command and press Enter:
    ipconfig /flushdns
  5. You can now reopen your web browser or email program.

Microsoft Windows XP

  1. Save your work and close any open programs, such as your web browser or email.
  2. Open the Start menu and select Run.
  3. Type cmd into the box and click OK.
  4. When the black window appears, type the following command and press Enter:
    ipconfig /flushdns
  5. You can now reopen your web browser or email program.

Mac OS X

Before you start, please note that the command in step 4 only works with Mac OS X 10.10 Yosemite. It will not work on earlier versions because the command changes between versions. Check your Mac OS X version using Apple’s instructions and find the command that matches your version.

  1. First, close any application you are using, like your web browser or email program. 
  2. Open your Applications folder. 
  3. Find the Utilities folder, then double-click Terminal to open it.
  4. Type this command and press Enter: 
    sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed
  5. If you are asked, enter your administrator username and password.
  6. Restart your web browser or email application.

    Don't worry if If you see a message like Not found, don't worry. Just go ahead and restart your application.

Here are some helpful lists of previous OSX versions and their commands:

Linux

Keep in mind that Linux distributions and versions can have different commands because of their configurations. One of the commands below should work for you.
  1. Open a root terminal window. If you are using Gnome, you can press Ctrl+T.
  2. Type this command and press Enter:
    /etc/init.d/nscd restart

    Depending on your setup, you might need to use sudo instead:

    sudo /etc/init.d/nscd restart

    On some distributions, this command works:

    sudo /etc/init.d/dns-clean start

    Or you might need to use this command:

    sudo service nscd restart

    In some installations, NSDS might be in a different directory, like in the example below. You may need to find out where it is installed so you can run the right command.

    /etc/rc.d/init.d/nscd restart
  3. After running the command, restart your application, such as your browser or email client.

Related Topic

What Happens When You Change Your DNS Settings to Point Somewhere Else?

There are instances when you point your DNS to third-party providers, for example, to improve your website’s speed or as an optimization strategy. You can definitely do that by setting up an account with them and pointing your DNS records to their servers. However, please be advised that any changes in the DNS records will require a little time to sync in, which is known as propagation.

How can we help you? Please contact us via phone or chat if you need assistance.

Loading...