Lately, I've had a problem. I have visited a website many times. Sometimes, when I use Charles proxy to detect the network flows, the ssl certificate is found to be invalid. At the time, I communicated over http not https. But when I normally access the website, I use https. If the SSL cert is invalid, can an https connection automatically redirect to http?
If the SSL cert is invalid, can an https connection automatically redirect to http?
The redirect is sent with the HTTP protocol. With HTTPS you first establish a TLS connection and then HTTP is spoken inside this TLS connection. This means a redirect from a
https://site UrL to a
http://site URL most first establish a successful TLS connection and only then the redirect will be sent by the server and executed by the browser.
But if the certificate is invalid the TLS connection will fail already and thus the redirect will not happen.