If you have website connection problems, try this
When you browse the internet, a Domain Name System (DNS) service will actively translate, or “resolve,” the various web addresses that you come across into a format that your Windows, Mac, Android, or iOS device understands. These addresses are then cached locally to help speed things up.
But if something changes in the meantime, your web browser may run into connectivity issues and fail to load some websites properly. In that case, you must get rid of the DNS cache to force your device to look up each web address again.
On Windows and macOS, you can clear the DNS cache quickly using the Command Prompt, Windows PowerShell, and Terminal consoles. On Android and iOS, however, the procedure isn’t as straightforward and you’ll have to try a few methods one at a time.
Clear DNS Cache on Windows
If you have a PC with Windows 7, Windows 8, Windows 8.1, or Windows 10 installed, you can use the Command Prompt console to clear the DNS cache.
Alternatively, you can use the Windows PowerShell console in Windows 8/8.1/10 to get the same result.
Use Command Prompt to Clear DNS Cache
1. Press Windows+R to open the Run box. Then, type cmd and select OK.
2. Type the following into the Command Prompt console:
3. Press Enter.
Use Windows PowerShell to Clear DNS Cache
1. Right-click the Start button and select Windows PowerShell. Or, press Windows+R, type powershell.exe, and select OK.
2. Type the following into the Windows PowerShell console:
3. Press Enter.
Clear DNS Cache on Mac
You can clear the DNS cache on a Mac using Terminal. This applies to macOS Big Sur 11.0, macOS Catalina 10.15, and macOS Mojave 10.14, including earlier versions of macOS dating back to OS X Mavericks 10.9.
1. Go to Finder > Applications > Utilities and launch Terminal.
2. Copy and paste the following command:
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
Note: In OS X Yosemite versions starting 10.10.0 through 10.10.3, you must use the following command instead:
sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches
3. Press Enter. When Terminal prompts you for an administrator password, type it and press Enter again.
Clear DNS Cache on Android
On Android, either toggling Airplane Mode on/off or performing a hard reboot usually clears the DNS cache. Additionally, you can see if flushing Google Chrome’s internal DNS cache can help. If nothing works, you must perform a network settings reset.
Enable/Disable Airplane Mode on Android
You can enable/disable Airplane Mode via your Android device’s Quick Settings pane. Just swipe down from the top of the screen once or twice to reveal the Airplane Mode icon. Then, tap it to enable Airplane Mode. Wait for a few seconds and tap it again to disable Airplane Mode.
Hard-Reboot Android Device
If turning Airplane Mode on/off didn’t help, try hard-rebooting your Android device. Usually, that involves pressing and holding the Power button for 10-20 seconds. If you can’t do a hard-reboot that way, it’s best to perform a Google search with your Android’s model name for specific instructions.
Clear Chrome’s Internal DNS Cache
Google Chrome, Android’s built-in native web browser, features an internal DNS cache. Try clearing it out.
1. Open Google Chrome. Then, type the following path into the address bar and tap Enter:
2. Select the DNS side-tab and tap Clear host cache.
3. Select the Sockets side-tab and tap Close idle sockets, followed by Flush socket pools.
Reset Android Network Settings
A network settings reset requires you to dig into the Settings app on your Android smartphone. The steps below may not appear the same on your end, but you should get the idea.
Note: The reset procedure will delete all saved Wi-Fi connections and passwords on your Android device, so do be prepared to set up everything from scratch again.
1. Open the Settings app on your Android device.
2. Tap System.
3. Tap Reset.
4. Tap Network Settings Reset.
5. Tap Network Settings Reset again to confirm.
Clear DNS Cache on iPhone
If you use an iPhone, enabling/disabling Airplane mode, force-restarting the device, or resetting the network settings should help you clear the DNS cache.
Enable/Disable Airplane Mode on iPhone
Swipe down from the top right of the iPhone’s screen to open the Control Center. If your device uses Touch ID, swipe up from the bottom of the screen instead.
Then, tap the Airplane Mode icon. Wait for a few seconds and tap the Airplane Mode icon again.
Force-restarting an iPhone requires pressing specific button combinations that change depending on the make and model of your device.
iPhone 8 and newer: Quickly press the release the Volume Up button, press and release Volume Down button, and press and hold the Side button until the Apple logo shows up on the screen
iPhone 7: Press and hold both the Volume Down and Side buttons at the same time until you see the Apple logo on the screen.
iPhone 6s and earlier: Hold down both the Side/Top and Home buttons together until the Apple logo shows up on the screen.
Reset iPhone Network Settings
An iPhone network settings reset will not only clear the DNS cache, but also all saved Wi-Fi networks and passwords. Unless you rely solely on cellular data, you must manually reconnect to each Wi-Fi network afterward. Only try this if the other methods failed to work.
1. Open your iPhone’s Settings app.
2. Tap General.
3. Tap Reset.
4. Tap Reset Network Settings.
5. Tap Reset Network Settings again to confirm.
Don’t Forget the Browser Cache
Flushing out the DNS cache alone may not be enough. Web browsers cache all sorts of other web content locally, and that can cause lots of issues as well. If you continue to experience problems while loading websites, try clearing the browser cache. Also, don’t forget to troubleshoot other network-related issues.