All web browsers, including Apple Safari, rely on the DNS to resolve the domain name into the server IP address for rendering page content. The resolved DNS is then cached into browser storage for quick identification on the next visit.
However, when a site web server’s IP address changes, the cached DNS information will no longer be valid which leads to failure. Hence, we need to clear that cached data to fix the problem.
The DNS cache of a web browser is independent of the DNS cache on your device. If we try to flush the system DNS cache, it might not clear Safari’s cached DNS or any other network-connected application that is not dependent on the device.
Clearing the DNS cache will help fix network and web page loading issues in Apple Safari. You can learn to clear it on macOS and iOS/iPadOS devices.
Clear DNS Cache in Safari on macOS
The Safari browser on Mac does not have a dedicated option that can clear only the DNS cache. However, we can rely on the Empty Cache option that will delete the entire cache occupied in 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 flush the DNS cache from Safari on macOS:
- 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 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.
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.
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 on How to Clear DNS Cache in Apple Safari, then feel free to drop in below comment box. You can also report the outdated information.