What does HTTPS protect, and what can someone watching the network still see?
Show the answer
Say this first
HTTPS protects the content of the HTTP exchange: the URL path and query, headers, cookies and bodies are encrypted and tamper-proof, and the certificate proves the client is talking to the named server. An observer still sees the IP addresses and ports, the timing and size of the traffic, the DNS lookup unless it is encrypted, and the hostname in the SNI field of the ClientHello unless Encrypted Client Hello is used. With TLS 1.2 the server certificate is also visible.
Go deeper
Visible versus hidden
| Item | Visible on the wire |
|---|---|
| Client and server IP, ports | Yes |
| DNS query for the name | Yes, unless DNS over HTTPS or TLS |
| Hostname in SNI | Yes, unless ECH |
| Server certificate | TLS 1.2 yes, TLS 1.3 no |
| Path, query string, headers, cookies, body | No |
| Size and timing of requests | Yes, which allows traffic analysis |
How enterprise firewalls filter HTTPS
- Without decryption: by destination IP, SNI and, for TLS 1.2, the certificate.
- With decryption: the firewall acts as a proxy and signs a substitute certificate with an enterprise CA that managed devices trust. Pinned or mutually authenticated applications break and are usually exempted.
HSTS
A Strict-Transport-Security header tells the browser to use HTTPS only for that site for a period, so a
later typed http:// link is upgraded before any packet is sent. Preload lists ship that rule in the browser.
They will ask next
Does HTTPS hide which website I visit?
Not by itself. The SNI and the DNS lookup reveal the hostname, and the IP often does too. Encrypted DNS plus ECH hide the name, but the IP address and traffic pattern remain.
What does the padlock prove?
That the connection is encrypted and the server holds a valid certificate for that hostname. It says nothing about whether the site is honest.
Traps
- Saying HTTPS hides the domain name. The SNI is plaintext without ECH.