Hello All,
I have been doing some research about how does the browser gets to know which port its going to use when you first access a website? Suppose I have a Vanilla machine and I access the URI
google.com (without any www or protocol identifier http/https), how does the browser gets to know which port its going to make a connection to? Note that this is the first time I am accessing
google.com from browser no HSTS is out of the picture.
If you look at a Packet capture when you access a website, it shows DNS happening and after that the TCP Handshake. For DNS, chrome will send a DNS Query on port 53. But for a TCP Handshake, which port will Chrome browser try first? 80 or 443? Also let's say I run a Non Secure website with HTTPS like
https://www.nossl.com. In this scenario, I am explicitly telling the browser to first go to 443 and in tcp handshake I think I will see failover happening from 443 to 80 as server would not open up a connection on 443. Am I right?
Thanks in advance for your help.