HTTP and HTTPS request path
From a URL to a response
HTTP defines how clients request resources and how servers describe results. HTTPS uses HTTP with a protected connection: for a typical new HTTP/1.1 or HTTP/2 HTTPS connection, resolve the hostname, establish TCP, negotiate TLS and verify the server identity, then exchange HTTP messages. HTTP/3 has a different transport setup, covered next. DNS success does not prove that the service is listening. A valid certificate does not guarantee that the application is safe or authorized.
Read a fictional request
A client opens https://shop.example/items/7. In this offline trace DNS yields a documentation address, the server listens on TCP 443, and the client verifies a fictional certificate for shop.example. Assume a new TLS 1.3 connection, no cache or proxy and HTTP/1.1 selected. The readable request and response below represent application data after decryption, not visible plaintext on the wire. CRLF delimiters and the blank header separator are represented as text lines. The body is exactly two ASCII bytes.
DNS: shop.example -> 192.0.2.40TCP: connected to 192.0.2.40:443TLS: identity verified; ALPN=http/1.1
GET /items/7 HTTP/1.1Host: shop.example
HTTP/1.1 200 OKContent-Type: text/plainContent-Length: 2
OKMethods, status codes and versions
GET requests a representation; POST submits data for resource-specific processing; PUT requests creation or replacement of the target state. DELETE requests removal of the association with the target resource. Method semantics do not guarantee what a particular application actually does. Status classes are 1xx informational, 2xx successful, 3xx redirection-related, 4xx client-error and 5xx server-error. For example, 200 means success, 404 means the origin did not find a current representation or is unwilling to disclose one, and 503 means temporary unavailability. HTTP/1.1 uses text start lines and fields; HTTP/2 and HTTP/3 use different framing while keeping common HTTP semantics.
Intermediaries and caching
A forward proxy acts on behalf of clients; a reverse proxy receives requests on behalf of servers. A load balancer distributes requests or connections across eligible backends, depending on its layer and design. A reverse proxy can terminate TLS, which makes the next hop a separate trust boundary. A cache can serve a stored response according to freshness and validation rules. For a simplified public GET response with max-age=60, no other directives, unchanged request variant and zero initial age, age 25 seconds is fresh while age 70 is stale. Stale responses are not automatically forbidden in every situation; this example requires validation or a new response before reuse. Do not cache personalized data indiscriminately.
Client -> reverse proxy / cache -> origin A or origin BCache-Control: max-age=60Age: 25 -> freshAge: 70 -> staleFind the failing stage
In a new connection, a DNS error occurs before transport; a TCP connection refusal occurs before TLS; a hostname mismatch is a TLS identity failure; an HTTP 503 arrives after an application exchange is possible. Keep certificate verification enabled and investigate the intended hostname, trust chain and clock rather than bypassing checks. A timeout alone does not identify a unique cause. Real clients may reuse connections or cached DNS and run operations in parallel. Practice: a trace shows DNS and TCP success followed by an untrusted certificate. Which stage failed? TLS verification, not HTTP routing. See RFC 9110, 9111, 9112, 9846 and 9525. RFC 9846 supersedes RFC 8446 for TLS 1.3; older implementations and documentation may still refer to the earlier RFC. Verify the supported library version separately.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
HTTP and HTTPS request path — knowledge check
Apply concepts to fictional application protocol scenarios.
DNS resolves shop.example but TCP reports connection refused. Which stage failed?
A connected server presents a certificate for a different hostname. What should the client do?
The decrypted response has status 503. Which stage produced this evidence?
A cached public response has max-age=60 and age 25 with the lesson assumptions. What is its freshness?
Which intermediary accepts requests on behalf of origin servers?