How to Easily Flush DNS Cache (Windows, Mac, Linux)

Flush DNSDNS stands for Domain Name Servers. When a website or a web application is hosted on a server, irrespective of whether it is Linux based or Windows based, a specific decimal separated series of numbers is assigned to it, which is technically known as IP address. DNS is just like english translation of these numbers.

When a website address is entered into a web browser it looks for its DNS, which is assigned to the domain on the domain registrar website. It is then translated into the assigned IP address and the request to return the website is made to the server corresponding to that DNS and hence IP address.

Flush DNS


The reason to illustrate how DNS works is to make it easier for you to understand how DNS Cache works.

In a quest to improve response time the web browsers store the DNS address of the websites you have already visited. This process is known as DNS Caching.

So, if a website owner has migrated the website to another server with a new DNS (and IP address) you might still be seeing the website from old server due to DNS cached by your local machine. In order to view website from new server you need to clear the DNS cache from your computer. Sometimes the cache is stored for longer durations, and you won’t be able to see the updated version until the cache is cleared.

It is completely a backend process that a normal user will never come to know. You will not even able to identify it unless you know there is a change on website which is not displaying to you. So if you have migrated your website to new server, and have made some changes on your website but you are not able to see those changes on your machine, the one of the first diagnostic steps you need to take is to flush the DNS. You can do it at your browser level, as well as at your Operating System level using a flush command. We will explain the process in greater detail in the sections below.

Hard Refresh from your Web Browser:

Before flushing the DNS you can try to hard refresh the web page you want to access. This will clear the web page cache and this will make your browser look for updated files of the web page.

If you are using Internet Explorer, Microsoft Edge, Mozilla Firefox or Google Chrome on a Windows Operating System you will have to press ‘Ctrl+F5’ on your keyboard.

If you are using Mozilla Firefox or Google Chrome on your Apple/MAC Machine you will have to press ‘CMD + SHIFT + R’ on your keyboard.

If you are using Apple Safari you will have to enter ‘SHIFT + Reload’.

You can also try to access the page using Incognito Mode (Chrome) or Private Window (Firefox).

How to Clear the Cache:

The process of clearing the cache depends on your operating server and browser.

Clearing the Cache on Windows OS

Here is a step by step process to follow:

  1. Go into Command prompt mode:
    • A. Press WIndows + R buttons on your keyboard
    • This will launch a small box for Run Commands.Flush DNS
    • Enter CMD in the box and press enter
    • It will open Command Prompt Screen
  2. Enter ipconfig/flushdns and press enter as shown belowFlush DNS
  3. It will display the Success Message as confirmation of DNS Flush

Flush DNS


Clearing the Cache on a MAC Operating System (iOS)

Here is a step by step process to follow:

  1. From the top navigation bar on your MAC machine click Utilities under Go
    Flush DNS
  2. Open the Terminal (which is the Command Prompt equivalent of WIndows OS)
    Flush DNS
  3. Execute the following command to clear the DNS Cache from your machine

  4. The above command could vary based on the OS Version as follows:


Mac OS Sierra, Mac OS X El Capitan, Mac OS X Mavericks, Mac OS X Mountain Lion, Mac OS X Lion sudo killall -HUP mDNSResponder
Mac OS X Yosemite sudo discoveryutil udnsflushcaches
Mac OS X Snow Leopard sudo dscacheutil -flushcache
Mac OS X Leopard and below sudo lookupd -flushcache

Clearing Cache on Linux OS

 On Ubuntu Linux and Linux Mint:

  1. Press Ctrl+Alt+T to open the terminal
  2. Once terminal is launched, enter following command code

    Flush DNS


  3. It might ask for admin password
  4. Once successful it will display a confirmation message as follows:

  5. If DNS Flush is unsuccessful, please follow below steps
  6. In terminal enter following command


  7. Once the above command is successful, repeat steps 1 to 4


On Linux CentOS:

  1. Press Ctrl+Alt+T to open the terminal
  2. Enter following Command:
  3. To restart DNS service enter following command

    Flush DNS


Clear DNS Cache in Chrome

  1. Open Google Chrome
  2. In address bar enter following address:
  3. It will display following options:Flush DNS
  4. Click on “Clear host cache” button

Clear DNS Cache in Firefox

  1. Go to History and click on Clear History optionFlush DNS
  2. Select Cache (along with other relevant options if you want), and click on Clear Now button.Flush DNS


Clear Browser Cache for Safari

  1. Go to Advanced Settings options under Preferences
  2. Select the option to display ‘Show Develop menu in menu bar’Flush DNS
  3. It will display an additional option of Develop in browser Menu Options
  4. Under Develop it will display Empty Caches optionFlush DNS
  5. This will clear the DNS Cache
  6. Alternately, if you want to completely Clear the Cache, you can directly click on Clear History under History menu option of your Safari browser


Internet Explorer

  1. Click on the Top Right Icon and Click on SettingsFlush DNS
  2. Click on “Choose what to clear” option under Clear browsing dataFlush DNS
  3. Select “Cached data and files” option from the menu. Flush DNS



Based on the Operating System and Browser you are using you can adopt one of the above methods if you encountered any issue. As a step by step procedure you can try these:

  1. Try Hard Refresh of Web Page (Ctrl+F5)
  2. Use Clear Browsing Data option from your Browser’s setting (as mentioned in above steps)
  3. Flush DNS of your Operating System ( Using Command Prompt as mentioned above)
  4. Restart your Modem to reset your internet connection


This will most probably resolve your issue if you are not able to see updated version of your website recently migrated to new server. We recommend to contact the tech support of your Hosting Provider if you stil facing the issue even after following above steps.


Leave a Reply

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