Safari keeps forcing HTTPS on localhost

I was able to solve this based on an answer from Ask Different.

In short, closing Safari, then running the commands below, worked.

sudo killall nsurlstoraged
rm -f ~/Library/Cookies/HSTS.plist
launchctl start /System/Library/LaunchAgents/com.apple.nsurlstoraged.plist

Restarting Safari after running that and trying to go to http://localhost:3000 solved the problem and did not redirect to to https.

Hopefully this helps someone fix this problem.


In Safari 13.0.5, deleting website data for localhost (Safari > Preferences > Privacy > Manage Website Data...) solves the problem.

Safari > Preferences > Privacy Manage Website Data...


You can try

deleting website data for localhost (Safari > Preferences > Privacy > Manage Website Data...)

After that close browser and try it.

If cannot you can try make different port 80 after back port 80 for localhost