How to Flush DNS Cache on Windows, macOS, Android and iOS.
You’re having trouble opening a specific website on your computer while it works fine on other devices on your network. Or you just changed the default DNS on your system to call it a custom server, but the change did not take effect.
Now you can either wait 5 minutes to 24 hours for the DNS to clear on its own, or try the old-fashioned method that fixes 90% of most technical problems – restarting the device. But if for some reason you do not want to reboot the device (for example, maybe there are some background downloads), then to speed up the process, you can manually clear the DNS cache. And here’s how to do it on Windows, macOS, Android and iOS.
Related: How to Change DNS Server on Windows | Mac | Android | iOS
What is the DNS cache?
Before we decrypt the DNS cache, we first need to understand what DNS is.
As we all know, computers only understand strings of 0 and 1, and it is easier for us humans to memorize individual English words. So, while it’s easier for us to remember a domain name like google.com, computers need to translate it to an IP address like 139.130.4.5. Now there must be some kind of system that translates domain names to the corresponding IP address? Well, that’s what DNS is. Just like a telephone directory keeps records of names and phone numbers, DNS maintains a registry for a domain name and corresponding IP address.
The DNS cache is a telephone directory (temporary database) stored on your local computer.
Why Flush DNS Cache?
In most cases, using a local DNS cache is convenient because it speeds up Internet access. However, just as we humans sometimes change our phone number, websites also change their IP address when they switch to a new server, or the database may get corrupted over time, or you have recently made changes to the DNS server from your ISP to your own. In all these 3 cases, you need to flush your DNS
Just like a toilet flush that gets rid of any dirt left over from flushing DNS, removes existing DNS names, IP addresses and grabs new ones that you programmed earlier, and if it doesn’t, then it will use the default DNS from the provider.
So now that we have a clear foundation, here’s how to do it.
Related: How to Check Which DNS Server You Are Using
Flush DNS Cache on Windows
You can easily clear the DNS cache on your Windows machine (regardless of version) using the command line. So open Open Command Prompt by pressing win + R key, then type cmd and press Enter.
To flush DNS, enter the following command and press Enter
ipconfig / flushdns
You will see a message that you have successfully cleared the DNS resolver cache. To confirm that your computer’s DNS cache has been cleared, enter this command “ipconfig / displaydns” and press “Enter”.
You won’t see any entries, or perhaps one or two depending on the programs on your desktop running in the background. And if you want to see what it usually looks like, just open Google Chrome. go back to the Command Prompt window and enter the command “ ipconfig / displaydns ” again. You will see a list of all websites and IP addresses stored in your new DNS cache. Also remember that sometimes you may have to close and reopen your browser for this DNS flush to take effect.
Also remember that sometimes you may have to close and reopen your browser for this DNS flush to take effect.
Flush DNS Cache on macOS
To clear the DNS cache on macOS, open the Terminal app by pressing cmd + space and enter Terminal. After the terminal appears in the dropdown list, select it and press Enter. Then copy and paste the command, d depending on what version of OS you have installed, enter the appropriate command,
To check your OS version, click the Apple icon in the upper left corner of your Mac and click About This Mac.
Mac OS X Yosemite and later
sudo killall -HUP mDNSResponder
Mac OS X Yosemite v10.10-10.10.3
sudo discoveryutil mdnsflushcache
Mac OS X Mavericks, Mountain Lion and Lion
sudo killall -HUP mDNSResponder
Mac OS X Snow Leopard
sudo dscacheutil -flushcache
After you enter them at the command line and press Enter, your Mac may ask you for your login password as confirmation, type it in and press Enter again. That’s it, you have successfully updated the DNS cache on your Mac.
Unlike Windows, mac doesn’t give any confirmations, and you also don’t need to exit and restart any active apps for this to take effect.
Flush DNS Cache on Android
You can easily clear the DNS cache on your Android device by restarting Wi-Fi. Yes, it’s that simple.
Step 1. Just close applications
Close the application completely. Make sure it is not running in the background either.
Step 2. Restart Wi-Fi
Turn off Wi-Fi on your device and turn it back on.
Step 3. Open the app
Open the app again. DNS cache must be cleared
Or, if you don’t want to turn off Wi-Fi, you can simply clear the cache of an individual app like Chrome or Netflix
Just go to Settings- Apps- find the app you are looking for, then go to “Storage” and click on “Clear cache”. And it should work.
Flush DNS Cache on iOS devices
iOS follows the same rule as Android. Just restart Wi-Fi and it should work. Swipe up from the bottom of the iPhone screen to open Control Center. Tap the airplane icon to turn on airplane mode – wait until the mobile network disappears, then click the airplane icon again to turn off airplane mode.
Swipe down to exit Control Center, DNS cache has been cleared successfully.
See Also: SmartDNS vs VPN – What’s the Difference?
Conclusion: how to clear the DNS cache
So there you have it, how to clear DNS cache on your computer and smartphone. To clear the DNS cache on your SmartTV or multimedia console like PS4, just restart the app and if that doesn’t work, try switching Wi-Fi or restarting your devices and it will eventually work.
Video: how to clear DNS cache on Windows, macOS, Android, iOS