Since Google is using HTTPS/SSL I am unable to access it using the IP of Google.com and passing the Host header. I don't understand why this is not working.
Here is what I have tried so far.
- I got the IP of Google.com
tracert google.com
Tracing route to google.com [216.58.207.238]
- Next I tried to connect using the IP with Host header
$ curl -H "Host: google.com" https://216.58.207.238
I got an error:
curl: (51) SSL: certificate subject name '*.google.com' does not match target host name '216.58.207.238'
- Next I tried this
$ curl https://216.58.207.238 --resolve "google.com:443:216.58.207.238" -H "Host: google.com"
But I got the same error message. So is it really not possible at all to open google.com by using the IP address?