I recently got a new company laptop. While this is generally great news, it means to go through a lot of configurations to adopt the standard image to my needs. One thing I noticed was that after installing a local http server, that Chrome won’t connect to http://localhost:8080, but instead goes to https://localhost:8080. Chrome loves security so much, that is switches to TLS even on a localhost connection. Now, this is not exactly how I can work. I cannot – but would love to – install a valid TLS certificate on all my localhost web servers. This is too much work and most of those servers are short living.
How can you disable the automatic switch to TLS done by Chrome?
It seems that this comes from HTST. Therefore, creating an exception is enough to not let Chrome make this TLS switch again.
First, check if HTST is active for localhost
Access chrome://net-internals/#hsts in Chrome
Go to query domain and search for localhost
Check the result. If you get some results, HTST is active for localhost
Deactivate HTST for Localhost
- Access chrome://net-internals/#hsts in Chrome
In the delete domain section, insert localhost
Validate the deletion by searching again for localhost. You should new get not found.