Middle+
What happens when you enter http://[site] in a browser and press Enter? Why does a HTTPS lock sometimes appear, and sometimes an error?
sobes.tech AI
Answer from AI
When you enter a URL in the browser and press Enter, several steps occur:
- Parsing the URL and determining the protocol (http or https).
- Finding the website's IP address via DNS.
- Establishing a TCP connection with the server.
- If the protocol is HTTPS, a TLS handshake occurs for encryption.
- Sending an HTTP request to the server.
- Receiving the response and displaying the page.
The HTTPS lock appears if the connection is secured with a TLS certificate, which:
- Is valid (not expired).
- Issued by a trusted certification authority.
- Matches the website's domain.
If the certificate is missing, expired, or invalid, the browser will show a security error, warning the user of the risks.