How to fix Chrome that redirects localhost to https ?

 

I was developing in ASP.NET MVC and used url http://localhost:4200. Suddenly, Chrome gave me the following error: ERR_SSL_PROTOCOL_ERROR

SSL? When looking at the url, I saw that Chrome added https… When I changed it back to http, Chrome forces https again…

This is caused by HSTS – see http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security

If you have (developed) any other localhost sites which send a HSTS header…

eg. Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

…then depending on the value of max-age, future requests to localhost will be required to be served over HTTPS.

To fix this, got to this url: chrome://net-internals/#hsts

Scroll all the way down to Delete domain security policies. Then, type localhost in the input field and press delete.

After that, localhost should be accessible again under http.

Post a Comment

0 Comments