Are you looking for How to easily flush the DNS command cache? Then you are at the right post. In this comprehensive guide, you will learn How to flush the DNS command cache without any technical support.
When you host a website or an application on a server, whether it is Windows-based or Linux-based, a special set of numbers repeated by decimals is assigned to them. These numbers are commonly known as IP addresses. repeated by decimal.
DNS or Domain Name Server acts like a translator which translates the website URLs to their corresponding IP addresses.
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 –
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?
To flush DNS in your Windows 10 device here are some easy steps you should follow:
Here are the simple steps that will help you flush your DNS Cache all by yourself.
The steps can be different depending on the operating system versions.
First of all, on your Windows computer click on the “Start” button. After that go to the Run option and type “CMD” followed by hitting the “Enter” button.
Now run the CMD tool ad Administrator and type “ipconfig/flushdns” and hit “Enter”.
When the flushing DNS cache successfully sone a confirmation message will be displayed on the screen.
This way, you will be able to delete all the information stored in the cache and the computer will be forced to download the new data
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
Our plans start at $16.61. With dedicated VPS, dedicated resources, server stack, etc
2. How To Flush DNS in Mac Operating System(IOS)
If you are a Mac OS user, flushing the DNS cache can be as follows:
Go to your MAC machine and Open Finder > Go > Utilities.
Now click on the Terminal App and Open it. (The Terminal APP is equivalent to the Command Prompt of Windows OS)
Now run the following command to clear the DNS cache from your MAC OS machine.
sudo killall -HUP mDNSResponder && echo macOS DNS Cache Reset
The above-mentioned command could vary depending on the macOS version you use.
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|
Read: 🚩 What is a DNS
3. Clearing Linux DNS Flush Cache
If you are a Linux User, Follow the steps given below:
Follow the following steps to clear the DNS Cache On Ubuntu Linux and Linux Mint:
1. On your Linux machine, Press the Ctrl+Alt+T keys to Open the Terminal.
2. Now, when the terminal is launched, enter the following command code
sudo /etc/init.d/networking restart
3. It may not allow you to proceed further and ask you for an admin password,
But After completion, it will display a confirmation message as follows:
[ ok ] Restarting networking (via systemctl): networking.service
In case Flushing the DNS is unsuccessful, please enter the following command on your terminal:
sudo apt install nscd
Once the above command is successful, You can retry to flush the DNS cache by following the steps and repeating steps 1 to 3.
Steps to flush DNS Cache On Linux CentOS:
If you are a Linux CentOS user, flushing the DNS will be as follows:
1. First, press the Ctrl+Alt+T keys simultaneously to open the terminal APP.
2. When the terminal app opens, enter the following command and hit enter.
nscd -i hosts
3. Now if you want to restart the DNS service enter the following command.
service nscd restart
4. Clear DNS Cache in Chrome
You can also Clear the DNS host cache on your Chrome Browser, Follow the steps given below:
1. First Open the Google Chrome app on your PC and enter the following address in the Address bar.
2. It will open a Tab as shown in the picture above.
3. Now you have to click on the DNS option > “Clear Host cache” button.
5. Clean DNS Cache in Firefox
If you Firefox browser user, follow these steps to clear the cache:
1. First, open your Firefox browser, and go to the History tab located at the top as shown in the picture.
2. Now click on the Clear Recent History option > Select Cache( Along with the relevant options if you want) and click on the “Clear Now” button.
6. Clear Browser Cache for Safari
For Safari browser users, follow the steps given below:
1. On your MAC machine, open Safari browser and go to the “develop” tab located at the top of the menu.
2. Now in the Develop menu tab you will find a dedicated. “Empty Caches” option.
3. Click on it and you are done.
However, if you want to completely clear the cache, you can also directly choose to clear the history. Go to your Safari browser > History option > Clear History.
7. Clear Browser Cache for Internet Explorer
For Internet Explorer users, follow the steps given below:
Open your Internet Explorer Browser, and click on the three horizontal dots located at the right top corner as shown below:
Now click on the Settings option, followed by clicking on the “Choose what to clear” option under Clear browsing data.
Now you have the option to select what to clear. Mark check boxes that you would like to clear and click on the “Clear” button.
Things you should know before Flush DNS Cache
The main reason for mentioning” How DNS works” here is to make sure you have a basic understanding of How DNS cache works and Why it is so important.
Operating systems or your Local machine are designed to store the DNS addresses of the websites you visit so that whenever you visit the same website next time, the DNS lookup can be skipped and improves response time. This whole process is known as DNS caching.
So, if you have migrated your website to another web hosting or server with a new DNS, there are chances that you are still able to see the website from the old server. It is because your machine has stored the website’s DNS address in its DNS cache.
If you want to see your website from a new server, you need to clear your DNS cache from your machine or Computer irrespective of Operating system.
This whole process takes place a the backend, hence most of the users are not aware of this. Even you won’t be able to identify it unless you have made certain changes on the website and you won’t be able to see them.
Therefore, if you have recently migrated your WordPress site to a new server and made some customizations or changes to it. But still not able to see any difference or changes on your website.
One of the fundamental diagnostic steps you need to follow is to flush the DNS cache.
You can do it either on your browser or your Computer by simply following the methods that we have mentioned below.
Hard Refresh from your Web Browser
Before proceeding to flush your DNS cache you can try Refresh or Reload the webpage you were trying to access. This way it will clear the web page cache and the browser will be forced to load the updated or fresh files of the website.
If you are using web Browsers like Internet Explorer, Microsoft Edge, or Google Chrome on a Windows PC, you can try refreshing the webpage by simply pressing “Ctrl+F5” on your keyboard.
But if you are a macOS user and use browsers like Google Chrome or Mozilla Firefox for accessing websites, you need to press “CMD+SHIFT+R” on your Keyboard.
For the Apple Safari browser, you need to press “SHIFT+Reload” on your Keyboard.
On the other hand, you can also try to access the webpage 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.
Based on the Operating System and Browser you are using you can adopt one of the above methods if you encounter any issue
As a step-by-step procedure, you can try these:
Try Hard Refresh of the Web Page (Ctrl+F5)
Use the Clear Browsing Data option from your Browser’s settings (as mentioned in the above steps)
Flush the DNS of your Operating System ( Using the 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 the command prompt open type:
Snehil Prakash is a WordPress enthusiast and web development expert who previously served as the Marketing Manager at WPOven. He believes that business owners should spend their time investing in their core business missions, not setting up and maintaining a WordPress site.
Snehil has been instrumental in providing all-inclusive managed WordPress solutions to businesses of all sizes, ensuring that they have the resources they need for a robust online presence.