Jack
Jack

Reputation: 9784

My specific installation of Safari refuses to open my website

My copy of Safari refuses to open my website, example.com.

Every time I try and visit http://example.com Safari (not the server!) redirects me to https://example.com, and immediately tells me:

"Safari can't open the page "https://example.com" because Safari can't connect to the server "example.com".

It seems like my copy of Safari has 'cached' the HTTPS redirect or something.

Here is what I have tried:

But still every time I instantly get the message. It appears in a matter of milliseconds making me assume it's cached somewhere.

When trying on a Guest account, the problem goes away. However, both my Mac at home and at work are affected, presumably because iCloud is syncing some kind of Safari cache file.

This thread here seems to hint it is to do with HSTS (as @rluta has thought), or alternatively to do with Strict-Transport-Security headers being set. I have confirmed and no Strict-Transport-Security headers are being set when the webpage is accessed.

If at all possible I really don't want to have to "reset" my copy of Safari as I use it for everything day to day. Any ideas?

Upvotes: 9

Views: 1266

Answers (4)

Chris
Chris

Reputation: 308

I know it seems silly have you tried the obvious?

  • Go to Settings > Safari and Clear Cookies and Data
  • Restart both your device and your router. When they boot again any old setting will get refreshed from the ISP, possibly fixing something.

Upvotes: 1

agoeb
agoeb

Reputation: 269

Over at the Apple Support Forum, the following was reported to resolve the issue:

  1. Clear the cache
  2. Delete all entries for the domain from the history
  3. Delete HTST.plist
  4. Reboot the system

Hope that helps.

Upvotes: 4

Buyuk
Buyuk

Reputation: 1094

Have you tried to clear the history in Safari?

Upvotes: 1

rluta
rluta

Reputation: 6907

Since your site used to support HTTPS, you probably have a cached HSTS entry that directs Safari to always use HTTPS to connect to your site.

You can purge your HSTS settings in Safari like this:

  • close Safari
  • delete the ~/Library/Cookies/HSTS.plist file on your disk (or edit the file and remove just your site entry if you want to preserve other entries)
  • reopen Safari

Upvotes: 3

Related Questions