1

This question already has an answer here:

After the recent upgrade to macOS Mojave Safari started redirecting from http://localhost to https://localhost. The problem persists only in Safari, in Chrome everything is the same as before. Now I'm temporary using 127.0.0.1 as a replacement, but it's inconvenient due to some limitations of software I'm using.

I tried searching and found some similar questions, where accepted answers were to kill Safari and remove ~/Library/Cookies/HSTS.plist file, and in my case it didn't work.

I also tried this answer, without luck.

marked as duplicate by Ruskes, IconDaemon, Nimesh Neema, Mark, Ɱark Ƭ Oct 24 '18 at 11:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • is it the SIP on Mojave doing it ? – Ruskes Oct 23 '18 at 20:48
  • @Buscar웃, I disabled SIP in order to remove ~/Library/Cookies/HSTS.plist – Niktin Roman Oct 23 '18 at 20:50
3

Safari did that before Mojave.

Try this to fix it

sudo killall nsurlstoraged
rm -f ~/Library/Cookies/HSTS.plist
launchctl start /System/Library/LaunchAgents/com.apple.nsurlstoraged.plist
  • That helped, thanks! Actually, I was wondering if anything could be done with SIP enabled, as it was in the question my is marked as a possible duplicate of, because I wasn't able to remove HSTS file with SIP enabled. – Niktin Roman Oct 24 '18 at 7:00

Not the answer you're looking for? Browse other questions tagged .