Flush the DNS Cache in Windows and Linux.
Here in this post i explain how to flush DNS cache in windows and linux.
DNS Propagation:
When you update the nameservers for a domain , it may take up to 24-48 hours for the change to take effect. This period is called DNS propagation. In other words, it is a period of time ISP (Internet service provider) nodes across the world take to update their caches with the new DNS information of your domain.
Flush DNS:
While doing the above NS changes such as changing nameservers, it may be necessary to clear the DNS cache on your computer. By default, all computers store a cached version of DNS entries to make loading a website faster as opposed to having to look up the DNS record on each load.
When you change or update your nameservers or modify DNS records, sometimes this will cause issues since your computer may not yet reflect the change.This is DUE to DNS propagation or the DNS not propagated(DNS changes can take up to 48 hours to fully propagate throughout the internet’s DNS servers)
We have to wait for few hours for all those actions to be done or complete.
It may be necessary to flush your DNS cache on your local computer when making DNS changes, especially when migrating your websites. This is a simply task to complete. In most cases, rebooting your computer will also have a similar effect.
The below is the guide lines to Flush the DNS cache on your computer:-
- Open a command prompt or terminal window
- On Windows type ipconfig /flushdns
- In Linux see options below depending on your distribution
- You can also simply reboot your computer to flush DNS cache instead of running any of the above commands.
Windows:
For a Windows computer, open a command prompt (CMD). This can be done by using the following steps below for your corresponding version of Windows.
Windows XP: Start > Run > cmd (type cmd in the run box & press Enter)
Windows 7: Start > cmd (type cmd in the search box & press Enter)
Windows 8: Start > All Apps > cmd (type cmd in the search box & press Enter)
Windows 10: Start > cmd (type cmd & press Enter)
For windows hositng details goto,
Once the command prompt up (black window) type the command below and then press Enter. This will clear the local DNS cache on the computer. (refer to the image below)
ipconfig /flushdns
You have to perform the above actions repeatedly for 5 to 10 times to clear the caches in your computer.
Linux:
From a terminal run one of the corresponding commands below, depending on your packages:
/etc/init.d/nscd restart service nscd reload /etc/init.d/named restart rndc restart /etc/init.d/dnsmasq restart service dnsmasq restart
That's all DNS has successfully FLUSHED in your computer.I think the above will help you.
Thanks for reading the post.
And if you like to know about cloudflare’s DNS to secure the site and load fast than click the link to know.