DNS, TCP, TLS and HTTP in order.
Step by step
1. DNS resolves the domain to an IP address.
2. The client opens a TCP connection (3-way handshake).
3. TLS negotiates encryption for HTTPS.
4. The client sends an HTTP request; the server replies with a response.
5. Connections may be reused (keep-alive) to skip setup costs.
HTTP essentials
Methods: GET (read), POST (create), PUT/PATCH (update), DELETE. Status codes: 2xx success, 3xx redirect, 4xx client error, 5xx server error. HTTP is stateless; cookies and tokens carry identity.
TCP vs UDP
TCP is reliable and ordered (web, databases). UDP is connectionless and lower latency but unreliable (video calls, games, DNS queries).