3

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?

  • With a config on the server, you can redirect to any port/protocol. – schroeder May 9 '16 at 4:13
5

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.

  • Thanks. I have another question,is there possible for https redirecting to http for the reason of the network problem? – Joy May 9 '16 at 6:20
  • 1
    @Joy: I have no idea what "network problem" exactly you have in might but to order a redirect the server needs to exchange data with the client and thus any network problems which affect data transport will also affect redirects. By its own a browser will not downgrade from https to http. – Steffen Ullrich May 9 '16 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.