-2

there a way to redirect or downgrade a https request

lets say i have example.com

if some one calls it with http:// example.com all fine if some one calls it with httpS:// example.com all fine

now if some one try to reach it httpS:// 100.200.100.200 (eg. over its ip address) he will get a Your connection is not private as i dont have a certificate for 100.200.100.200 or just a self signed

is there a way to redirect or downgrade the connection to http only to be able to show some message to the client whit out the need for him to interact with the Your connection is n... message ?

or is it prohibited for security reasons and a browser either gets what https side he requests or nothing at all

Ino
  • 41
  • 1
  • 7
  • Possible duplicate of [How do you redirect HTTPS to HTTP?](http://stackoverflow.com/questions/8371/how-do-you-redirect-https-to-http) – mmgross Mar 08 '17 at 18:50
  • Certificates are bound to domains, not IP addresses, which is why your certificate is working for example.com but not 100.200.100.200. The larger question I have is why someone would be accessing your site via IP rather than the domain name. – Brian Mar 08 '17 at 22:27
  • it is unimportant why or why not some one would access it whit an ip instead of a fqdm its just a technical question if you can or cant do what i want and as fare i found if you start a https connection you stuck whit it and cant down grade nor redirect mainly what i have expected for security reasons – Ino Mar 10 '17 at 00:19

1 Answers1

0

The certificate for example.com tells you that you really are communicating with them (and, because you know you want to visits example.com, it's fine) but the certificate for 100.200.100.200 tells you that you really are communicating with 100.200.100.200, but you can't be sure it's the same person as example.com, you have to be sure you get the right IP. DNS is probably more reliable...

Tom
  • 4,666
  • 2
  • 29
  • 48