Safari Can’t Establish a Secure Connection for Localhost? Here’s What You Should Do

Search Engine in Safari Browser
Quick Fix

Download and try Outbyte MacAries right now to see what it can do for your Mac.

Developed for macOS

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy Policy.

Safari browser not loading some websites and showing the error message “a secure connection could not be established.” Need to investigate the cause, which could be related to the website’s security certificate or your network connection.

Well, many Mac users have reportedly encountered the same error message when using Safari. While some were able to successfully resolve the problem, others weren’t. And for these users, problems like this can be frustrating.

Fortunately, there are ways to resolve it. And below, we will share with you some ways to fix the Safari can’t establish a secure connection error on Macs. But before anything else, what is this error message all about?

The Safari Can’t Establish a Secure Connection for Localhost Error

There are times when Safari can’t establish a secure connection, preventing you from accessing your favorite websites, such as YouTube, Twitter, and Facebook. According to experts, this error happens if the site you are trying to access is using a server that does not meet the recommended cryptographic standards.

Pro Tip: Scan your Mac for performance issues, junk files, harmful apps, and security threats
that can cause system issues or slow performance.

Free Scan for Mac Issues
macOS compatible

Special offer. About Outbyte, uninstall instructions, EULA, Privacy Policy.

To fix the problem, IT specialists often suggest performing the following actions:

  • reboot your Mac
  • remove website data
  • uninstall suspicious browser add-ons, plug-ins, and extensions
  • clear cookies
  • reset Safari, and
  • modify permissions

If none of these troubleshooting actions worked, then try the recommended fixes we have listed below.

How to Fix the Safari Can’t Establish a Secure Connection Error?

Before you proceed with any of the fixes below, make sure your Mac is free of junk files and potentially unwanted programs. In some cases, these files may keep you from accessing your favorite sites on Safari.

To clean your Mac from any unnecessary files and programs, we suggest that you download a Mac repair tool. Once you have one installed on your Mac, run a quick scan and let it do its job of finding junk files hiding on your system.

After cleaning your Mac, try any of the fixes below:

Fix #1: Check your DNS settings

Often times, malware entities interfere with your system and DNS settings, causing error messages to pop up.

To check your DNS settings, follow these steps:

  1. Go to System Preferences and select Network.
  2. Choose Advanced.
  3. Navigate to the DNS tab, and then click the + button.
  4. Into the text field, input 8.8.8 and press Enter.
  5. Again, click the + button.
  6. Input 8.4.4 into the text field and hit Enter.
  7. Click OK.
  8. Hit Apply.

Fix #2: Make sure the website’s certificate is trusted

SSL certificates are important to secure credit card transactions, logins, and data transfers. So, when visiting a website, make sure that it has a trusted certificate, especially if you are completing transactions.

To ensure that a site’s certificate is trusted, follow these instructions:

  1. Open Safari and visit the site that throws the error message “Safari can’t establish a secure connection error.”
  2. Check the address bar and click the Secure button that comes in the form of a lock icon.
  3. Click More Information.
  4. Select View Certificate.
  5. Check what certificate is in use by navigating to the Details tab and clicking the CMD + Space keys.
  6. Into the Spotlight search, input Keychain.
  7. Select System Roots and hover over the site’s certificate.
  8. Click on the certificate and expand the Trust section.
  9. In the When using this certificate section, choose Always Trust.

Fix #3: Disable IPv6 on your Mac

Because IPv6 is the latest Internet Protocol, not all devices support it yet. So, you might want to disable it first to ensure no errors arise while surfing the web.

Here’s how to disable IPv6 on your Mac:

  1. Go to System Preferences.
  2. Select Network.
  3. Choose Ethernet and click Advanced.
  4. Navigate to the Configure IPv6 section and select Manually.
  5. Click OK and choose Apply.

Fix #4: Clear Safari’s browsing history

Often times, clearing Safari’s browsing history resolves the error. Though some people think this is a bad idea, it actually worked for other Mac users.

To clear the browsing history of Safari, follow these steps:

  1. Launch Safari and click Clear History.
  2. Click the All History option.
  3. Your browsing history should now be removed.

Fix #5: Uninstall suspicious plugins and extensions

Add-ons, plugins, and extensions may speed up certain tasks with just a click or two. However, installing more than what you need may take a toll on Safari’s performance. Therefore, it is only wise to remove any unnecessary plugins and extensions.

Here’s how:

  1. Launch Safari and go to its menu.
  2. Select Preferences.
  3. In the window that pops up, click Extensions. This will show you a list of extensions that are currently installed on Safari.
  4. If you find a suspicious extension or one that you no longer need, click on it and select Remove.

Fix #6: Remove unnecessary cookies

Did you accidentally click on a pop-up that asks you to prevent cross-site tracking? In that case, you have probably accepted or enabled cookies. These cookies are messages that web servers send to end-devices. They are created for the purpose of remembering important information or record browsing activities.

Enabling cookies doesn’t really have a major fatal impact on your Mac, but it can trigger error messages like the Safari can’t establish a secure connection error.

To remove unnecessary cookies, here’s what you should do:

  1. Open Safari and go to Preferences.
  2. Click Privacy.
  3. Select Manage Website Data.
  4. Find and select the cookies of the sites that you no longer need.

Fix #7: Flush the DNS cache

Flushing the DNS cache can help fix different connection issues. While it seems like a difficult task, it is actually very easy to do, provided you input the command correctly.

Here’s how to flush the DNS cache:

  1. Close Safari.
  2. Launch the Terminal utility on your Mac.
  3. Into the command line, input this command: sudo killall –HUP mDNSResponder
  4. You might be prompted to enter your login credentials. Enter your username and password, then hit Enter.
  5. Relaunch Safari and check if the error persists.

Wrapping Up

If none of the fixes above worked, then it is likely that the problem is with the website. It could be possible that the website is facing a downtime at the moment, hence the error message.

Of course, reinstalling macOS is also an option, but we wouldn’t really suggest doing that. Just work your way down the list of fixes above, and you should find one that will work.

Do you have other fixes to add to our list? Share them in the comments section below.

Give us some love and rate our post!
[Total: 0 Average: 0]
Notify of
Inline Feedbacks
View all comments