How to Clear DNS Cache in Safari: A Step by Step Guide
Last Updated :
22 Mar, 2025
When using Safari, you might occasionally encounter issues like websites not loading, seeing outdated versions of pages, or experiencing slow browsing speeds. These problems can sometimes stem from Safari’s DNS cache. Safari maintains its own cache of DNS (Domain Name System) records to make web browsing faster, but if this cache becomes outdated or corrupted, it can cause connectivity problems.
Now, clearing the DNS cache is a simple fix that can get things back on track. In this article, we’ll explain what DNS is, why Safari uses a DNS cache, and walk you through the steps to clear it.
How to Clear DNS Cache in SafariWhy to Clear Safari’s DNS Cache?
You don’t need to clear the DNS cache regularly, but it’s a good troubleshooting step if you notice:
- A website you know is active won’t load in Safari.
- A site shows an outdated version, even though you know it’s been updated.
- DNS-related error messages like “Safari Can’t Find the Server.”
- Problems after changing DNS settings or switching networks.
Clearing the cache is safe and has minimal downsides—though the first visit to a site afterward might be slightly slower as Safari performs a new DNS lookup.
How to Clear DNS Cache in Safari - Complete Steps
Safari doesn’t have a direct “clear DNS cache” button like some other browsers, but you can achieve the same result by clearing Safari’s overall cache or using system-level commands. Below are three methods to clear the DNS cache in Safari, with the first method being the most straightforward for most users.
Method 1: Clear Safari’s Cache via the Develop Menu (Recommended)
This method clears Safari’s entire cache, which includes the DNS cache. It’s the easiest approach for most users.
Step 1: Enable the Develop Menu:
Open Safari
- Click Safari in the menu bar at the top of your screen, then select Preferences.
Preferences
Advanced tab- Check the box next to “Show Develop menu in menu bar.”
Show Develop menu in menu bar- Close the Preferences window.
Step 2: Clear the Cache
- Click Develop in the menu bar.
Develop - Select “Empty Caches” from the dropdown menu.
Empty CachesThis will clear Safari’s cache, including the DNS cache. Note that this also clears other cached data like images and scripts, which might not be ideal if you only want to clear the DNS cache. However, it’s the most accessible method for most users.
Method 2: Use Terminal to Flush DNS Cache in Safari
This method flushes the DNS cache at the system level, affecting all applications, including Safari. It’s more targeted than clearing Safari’s entire cache but requires comfort with using Terminal.
Step 1: Open Terminal:
- You can find Terminal in Applications > Utilities or by using Spotlight (press Cmd + Space and type “Terminal”).
- Run the Flush Command:
- Type the following command and press Enter:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- You’ll be prompted to enter your administrator password. Type it and press Enter. (Note: You won’t see the characters as you type.)
Step 3: Restart Safari
- Close and reopen Safari to ensure the changes take effect.
This command clears the DNS cache for the entire system, which can be more effective for resolving persistent DNS issues.
Pros and Cons of Each Method
Here’s a quick comparison to help you choose the best method for your needs:
Method | Pros | Pros |
---|
Clear Safari’s Cache | - Easy to do within the browser.
- No need for Terminal or admin access.
| - Clears all cached data, not just DNS.
- May temporarily slow down browsing.
|
---|
Use Terminal | - Specifically targets the DNS cache.
- Doesn’t affect other cached data in Safari
| - Requires admin access and Terminal use.
- Slightly more complex for beginners.
|
---|
Conclusion
Clearing the DNS cache in Safari is a quick and effective way to fix common browsing issues, from websites not loading to outdated content. Whether you choose to clear Safari’s cache through the Develop menu or use Terminal for a more precise approach, this guide provides the tools you need to refresh Safari’s DNS data. If problems persist, explore additional troubleshooting steps like checking VPN settings or restarting your router.
Similar Reads
How To Reopen Closed Tabs in Chrome, Safari, and Firefox? Have you ever closed any tab while browsing the Internet? If yes, then most of the time we might close any tab accidentally which was not supposed to happen. Now, whether you are using Safari, Google Chrome or Firefox, if you don't have any idea how to reopen the closed tab then things can be tricky
4 min read
How to Flush the DNS Cache in Linux? Are you facing domain resolution issues, or are the websites you're trying to browse not loading fast enough? Well, flushing the DNS cache in Linux can be a fast and effective solution. The DNS cache stores the IP addresses of all the websites you browse and over a period of time, this data becomes
7 min read
How to clear the Firefox Cache? Clearing the cache in your web browser can significantly improve its performance and help resolve various browsing issues. If you're using Firefox, knowing how to clear the Firefox cache is essential for maintaining optimal browsing speed and functionality. This article will walk you through the ste
3 min read
How to clear cache on a Mac In the fast-paced world of technology, our trusty Mac computers can sometimes start to slow down and behave a bit sluggish. If you've ever experienced the frustration of a Mac that seems to be running as if it's stuck in quicksand, fear not â you're not alone. The culprit, more often than not, is a
10 min read
How To Clear DNS Cache on Android Device? In this digital era, everyone would have experienced error 404 webpages not found, or many other website glitches. All this happens because of a reason - Not Clearing the DNS Cache. So, flushing DNS Cache should be a daily maintenance task, as it is not only recommended but also a good practice that
5 min read
How To Clear DNS Cache on Android Device? In this digital era, everyone would have experienced error 404 webpages not found, or many other website glitches. All this happens because of a reason - Not Clearing the DNS Cache. So, flushing DNS Cache should be a daily maintenance task, as it is not only recommended but also a good practice that
5 min read