DNS cache temporarily stores IP addresses of web servers previously visited. It speeds up subsequent visits by bypassing DNS server queries. However, outdated or corrupt cache can cause issues.
To flush the DNS cache in Safari on macOS, we must first enable the Develop menu and then Empty Cache. We can use Airplane Mode, reboot the device, or reset the Network Settings for iPhone and iPad.
Note: The DNS cache of a web browser is independent of the device. If we try to flush the System’s DNS cache, it might not clear Safari’s cached DNS.
In this guide, I have shared written instruction about:
Clear the DNS Cache in Safari on Mac
The Safari browser on Mac does not have a dedicated option to clear only the DNS cache. However, we can rely on the Empty Cache option, which will delete the entire cache occupied by the browser, including the DNS cache.
The option to empty the entire cache is available under the Develop menu, which we must first enable. Here are the steps to follow:
- Launch the Apple Safari on your Mac.
- Click on the Safari menu and select the Settings sub-menu.
- Switch to the Advanced tab and enable the check box for the Show Develop menu in the menu bar option.
It will enable a new Develop menu in the Safari menu bar. - Click on the Develop menu on the menu bar.
- Select Empty Caches from the drop-down menu.
It will clear and empty all the cache files stored, including the DNS cache.
As mentioned earlier, the Empty Cache option flushes out the entire browser cache occupied in Safari on macOS. Hence, you might notice the website loading slower after the action.
Flush the DNS Cache in Safari on iPhone or iPad
Like macOS, Safari on iOS or iPadOS does not have an option. It does not even have the option to Empty Entire Cache on the device.
However, we can use the System’s DNS cache method to wipe out saved records. We can use Airplane Mode, Reboot, or Reset Network Settings on the device to reset the DNS cache.
Clearing DNS Cache with Airplane Mode
- Slide down to open the Control Center on your device.
- Tap on the Airplane mode button to Turn On.
- Wait for a few seconds and then Turn Off the Airplane mode.
Since Safari on iPhone or iPad relies on system DNS, the Airplane mode will force the network adapter to flush the DNS records. This is probably the simplest way to clear the DNS for any browser (including Chrome, Edge, Firefox, etc.) running on hand-held devices.
Alternatively, you can Reboot the device for the network and DNS cache flush.
Clearing DNS with Reset Network Settings
A more complex way to clear the DNS cache is by using the Reset Network settings option.
- Open the Settings app on your iPhone or iPad.
- Tap the General settings, and scroll to the bottom to select the Transfer or Reset iPhone option.
- Tap on the Reset command and select the Reset Network Settings option.
The Reset Network Settings option is not recommended unless you have a major network-related issue. The Airplane mode resets the DNS cache on Safari for iPhone or iPad instead.
Bottom Line
The web browser has its own system-independent DNS cache that helps resolve the website for rendering. If you’re facing any network and page loading issues in your Safari browser, you can consider clearing the DNS cache.
Though there is no dedicated option to clear the only DNS cache, you can use the Empty Cache menu on macOS and Airplane Mode or Reset Network Settings option on iPhone or iPad.
If the network or page loading issue is not resolved after cleaning DNS records, you can clear the Safari cache and cookies. It will ensure the cached site files are deleted and fresh files are downloaded from the web server.
Lastly, if you've any thoughts or feedback, then feel free to drop in below comment box. You can also report the outdated information.