This is a comprehensive guide that will enable you to flush the DNS command cache without any tech support. DNS 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 are assigned to it, which is technically known as IP address. DNS is just like an 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. Learn more about what is a DNS here?
In this article, we will cover the following topics and learn how to flush DNS in Windows, Mac, Linux, etc. So let’s move forward –
Things you should know before Flush DNS Cache
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 the old server due to DNS cached by your local machine. In order to view the website from a 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 the website which is not displaying to you. So if you have migrated your website to a new server, and have made some changes on your website but you are not able to see those changes on your machine, one of the first diagnostic steps you need to take is to flush DNS cache. 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.
In case 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).
If you want to acquire detailed knowledge about Domain Name Servers, you can visit the Wikipedia page for DNS.
Here are the simple steps that will help you flush your DNS Cache all by yourself.
The steps are customized as per your operating system.
1. Click on “Start”.
2. Go to Run option.
3. Type “cmd” and press Enter.
4. Run as Administrator.
5. Type “ipconfig/flushdns”.
6. A message of confirmation will be declared on the screen.
This process will delete all the information stored in the cache. This will force the computer to download new DNS information.
How to Flush DNS Cache
The process of clearing the cache depends on your operating server and browser.
1. How to Flush DNS in Windows 10?
Here are the steps to clear windows flush DNS –
- Go into Command prompt mode:
- A. Press Windows + R buttons on your keyboard
- This will launch a small box for Run Commands.
- Enter CMD in the box and press enter
- It will open Command Prompt Screen
- Enter ipconfig/flushdns and press enter as shown below
- It will display the Success Message as confirmation of DNS Flush
Check out our image below on how to flush DNS in Windows 10?
- FREE SSD Storage
- FREE SSL CERTIFICATE
- FREE Business Email
- FREE Over 100 premium themes and plugins
- FREE Daily Off-Site Backups
- FREE Malware Screening & Cleanup
- FREE WordPress Dev & Server Support
- Dedicated Server
Our plans start at $16.61. With dedicated VPS, dedicated resources, server stack, etc
2. How to Flush DNS MAC Operating System (iOS)
Here are the steps flush DNS cache mac –
- From the top navigation bar on your MAC machine click Utilities under Go
- Open the Terminal (which is the Command Prompt equivalent of Windows OS)
- Execute the following command to clear the DNS Cache from your machine
1sudo killall -HUP mDNSResponder && echo macOS DNS Cache Reset
- 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|
3. Clearing Linux DNS Flush Cache
Follow the following steps to clear DNS Cache On Ubuntu Linux and Linux Mint:
- Press Ctrl+Alt+T to open the terminal
- Once the terminal is launched, enter following command code
1sudo /etc/init.d/networking restart
- It might ask for admin password
- Once successful it will display a confirmation message as follows:
1[ ok ] Restarting networking (via systemctl): networking.service
- If DNS Flush is unsuccessful, please follow below steps
- In terminal enter following command
1sudo apt install nscd
- Once the above command is successful, repeat steps 1 to 4
Steps to flush DNS Cache On Linux CentOS:
- Press Ctrl+Alt+T to open the terminal
- Enter following Command:
1nscd -i hosts
- To restart DNS service enter following command
1service nscd restart
4. Clear DNS Cache in Chrome
Steps to clear DNS cache chrome –
- Open Google Chrome
- In the address bar enter the following address:
- It will display the following options:
- Click on “Clear host cache” button
5. Clean DNS Cache in Firefox
Steps to Clear Cache in Firefox –
6. Clear Browser Cache for Safari
Steps to clear cache in safari browser –
- Go to Advanced Settings options under Preferences
- Select the option to display ‘Show Develop menu in menu bar’
- It will display an additional option of Develop in browser Menu Options
- Under Develop, it will display Empty Caches option
- This will clear the DNS Cache
- Alternately, if you want to completely Clear the Cache, you can directly click on Clear History under History menu option of your Safari browser
7. Clear Browser Cache for Internet Explorer
Steps to clear cache in Internet Explorer –
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:
- Try Hard Refresh of Web Page (Ctrl+F5)
- Use Clear Browsing Data option from your Browser’s setting (as mentioned in above steps)
- Flush DNS of your Operating System ( Using Command Prompt as mentioned above)
- Restart your Modem to reset your internet connection
This will most probably resolve your issue if you are not able to see the updated version of your website recently migrated to a new server. We recommend contacting the tech support of your Hosting Provider if you still facing the issue even after following the above steps.
How To Clear DNS Cache in Windows?
It’s easy to flush DNS cache in Windows just –
- Click the Windows start button and type cmd
- Click on Command Prompt to open
- Enter the following command
- With command prompt open type: li>ipconfig/flushdns