From URL to first byte, and where it fails
By the end of this module you will be able to:
- Trace a web request from URL to first byte, naming each step in order
- Identify where a request can fail (DNS, TCP, TLS, HTTP) and what each failure looks like
- Explain why a cold request to a new server usually pays extra setup latency, and what warm paths skip
Real-world incident · May 30, 2020
One expired certificate broke thousands of websites overnight.
On May 30, 2020, the Sectigo AddTrust External CA Root certificate expired. This root certificate had been cross-signed to provide backward compatibility with older devices. When it expired, handshakes started failing for websites that included it in their certificate chain.
The web servers were running. DNS was resolving. TCP connections succeeded. But when browsers tried to verify the server's TLS certificate, they hit the expired root and rejected the connection. Newer browsers handled it gracefully (they had a newer root). Older clients, embedded devices, and certain server-side HTTP libraries failed hard.
To diagnose this, you needed to know exactly where in the request sequence the failure occurred. That is what this module teaches: the complete chain from URL to first byte, and what breaks at each link.
DNS resolved fine. TCP connected fine. But TLS failed. How do you narrow it down to the right step?
7.1 The request sequence, step by step
The Foundations modules so far gave you the individual pieces: layers, encapsulation, the two models, identifiers, subnetting, the IPv6 address plan, and the Wi-Fi first hop. This module connects them into a single end-to-end sequence. The path below is the cold HTTPS-over-TCP case: no DNS cache entry, no open connection, and no resumable TLS session. When you type https://example.com and press Enter, here is what happens:
Step 1: DNS resolution. The browser needs an IP address. It checks its own cache, then the OS cache, then sends a recursive query to the configured . The resolver walks the DNS hierarchy (root, TLD, authoritative) and returns an A or AAAA record. Typical time: 0ms (cached) to 100ms (cold lookup).
Step 2: TCP handshake.The browser opens a TCP connection to the server's IP on port 443. SYN, SYN-ACK, ACK: the costs one round trip. On a 20ms link, that costs 20ms. The 4-tuple (source IP:port, destination IP:port) now identifies this connection.
Step 3: TLS handshake. Over the TCP connection, the browser and server negotiate encryption using TLS 1.3 (RFC 8446). The browser sends a ClientHello with supported cipher suites and a key share. The server responds with its certificate and key exchange. One round trip. 20ms more.
Step 4: HTTP request. The browser sends GET / HTTP/1.1with headers including Host: example.com. With HTTP/2, this is a compressed HEADERS frame. The request travels encrypted inside the TLS session.
Step 5: Server processing. The server receives the request, runs its application logic (reading files, querying databases, executing code), and builds a response. This can take 1ms for a static page or 500ms+ for a complex dynamic page.
Step 6: HTTP response. The server sends back a status code (200 OK, 404 Not Found, 500 Internal Server Error) followed by response headers and the body content. The browser starts parsing HTML as it arrives, without waiting for the full response.
Total : DNS + TCP + TLS + server processing. With a warm cache, a reused connection, and a nearby server it can be tens of milliseconds. A cold start with full DNS resolution and a distant server often lands in the 150 to 300 ms range before application processing is counted.
The diagram below shows the cold request path. Each stage depends on the one before it for this TCP-based path. If DNS fails, nothing after it can happen; if the connection is already warm, several setup stages may be skipped.
URL to first byte is a timed chain
Each bar's width is its millisecond cost, from DNS through transport setup, TLS or QUIC and the HTTP request to first byte, and server work alone runs longer than DNS, TCP setup and TLS together, so shaving the handshake cannot recover the time the server is spending.
First byte is the sum of DNS plus TCP plus TLS plus HTTP request plus server work. Each step is observable and each has its own failure signature.
That waterfall is still the right skeleton, but two of its steps have been rewritten since it was first taught. The DNS step now returns more than an address, and the connection step is no longer a single attempt to a single address over TCP.
7.2 The 2026 connection dance
Steps 1 and 2 describe a browser that asks DNS for one address and then opens TCP to it. A current browser usually does something more elaborate, and most of the extra work happens before any transport connection exists.
The lookup asks how to connect, not just where. Alongside A and AAAA, the browser may query the for the name (RFC 9460), a service binding record that publishes connection parameters. It can carry an list naming the protocols the endpoint speaks, address hints so the client needs no second lookup, an alternative target name or port, and the public keys for . A browser that reads h3 in that list can open on the very first connection, instead of connecting over TCP and only learning that HTTP/3 exists from an response header on a later request.
The client races the address families. When the name resolves to both an and an IPv4 address, the browser does not pick one and wait for it to time out. (RFC 8305) starts the IPv6 attempt, waits a short stagger (RFC 8305 recommends 250 milliseconds for the connection attempt delay), then starts the IPv4 attempt alongside it and keeps whichever connects first. Version 3 of the algorithm is still an , so version 2 is the behaviour to reason about.
The transport is often not TCP. If the endpoint advertises h3, the browser can open on UDP port 443 (RFC 9000). QUIC carries the TLS 1.3 handshake inside its own setup, so steps 2 and 3 of the waterfall collapse into one exchange: there is no separate TCP handshake to watch and no separate TLS handshake after it.
The mental model changes with it. "Connect, then speak" becomes "ask DNS how to connect, then race". That is not decoration: it decides what you will see when you look.
Each of the three moves fails in its own way. A resolver or middlebox that mishandles the HTTPS query type returns nothing useful, so the browser falls back to plain A and AAAA records and pays for a second connection to reach HTTP/3. A firewall that drops UDP 443 makes every QUIC attempt fail, and the browser quietly retries over TCP, so the symptom is a slower start rather than an error. And an IPv6 path that black-holes traffic is absorbed by the race on a client, which is why "the site loads" is never evidence that IPv6 works.
DNS now tells the browser how to connect before it connects
The HTTPS record carries ALPN, address and ECH hints, so IPv6 races IPv4 and the connection often opens as QUIC on UDP 443 with no TCP handshake at all, which settles the transport and the time to first byte before a single byte of the page moves.
Before it opens anything the browser asks DNS how to connect: the HTTPS record (RFC 9460) carries ALPN, address and ECH hints, then Happy Eyeballs (RFC 8305) races IPv6 against IPv4.
None of this removes the old failure signatures. It moves them: a step that used to be one attempt to one address is now a race, and the losing attempt is usually invisible to the user. That is why the next section reads each step by the error it produces rather than by the order it runs in.
7.3 What failure looks like at each step
Each step produces a distinct error when it fails. Knowing which error maps to which step tells you where to focus your investigation.
DNS failure. The browser shows ERR_NAME_NOT_RESOLVED. You cannot reach the site by hostname, but you might be able to reach the server by IP address directly. Causes: DNS server down, domain expired, incorrect DNS record, network blocking port 53.
TCP timeout. The browser shows ERR_CONNECTION_TIMED_OUTafter a long wait (typically 20+ seconds). The SYN packet went out but no SYN-ACK came back. Causes: server down, firewall dropping packets to port 443, wrong IP address, network path broken.
TCP refused. The browser shows ERR_CONNECTION_REFUSEDimmediately. The server is reachable but nothing is listening on port 443. The server sent a TCP RST (reset) packet. Causes: web server not running, service crashed, listening on a different port.
TLS failure. The browser shows a certificate warning orERR_CERT_COMMON_NAME_INVALID. TCP connected successfully, but the TLS handshake failed. Causes: expired certificate (like the Sectigo incident), hostname mismatch, unsupported TLS version, untrusted certificate authority.
HTTP error. The connection succeeded. TLS completed. But the server returned an error status code. 500 means the server crashed internally. 502 means a reverse proxy could not reach the upstream application. 503 means the server is overloaded. 403 means you are authenticated but not authorised for this resource.
Each request failure has a first useful test
Timeout, refused, NXDOMAIN, SERVFAIL, certificate failure and an HTTP 5xx or high TTFB each pair with the boundary they implicate first and one safe test, so refused sends you to the listener and SERVFAIL to the resolver, not to the same guess twice.
Each observed failure points first at one boundary. Run the safe test for that boundary before guessing.
Of those five signatures, the TLS one is the only failure that proves the layers beneath it are healthy: the name resolved, the connection opened, and the rejection came from certificate checking. That makes the handshake itself worth reading closely.
7.4 TLS 1.3: what changed and why it matters
TLS 1.3 (RFC 8446, published August 2018) reduced the handshake from 2 round trips (TLS 1.2) to 1 round trip. It also removed several insecure features that had been exploited in attacks against TLS 1.2.
In TLS 1.2, the server's certificate was sent in plaintext. Anyone on the network could see which website you were connecting to by reading the certificate. TLS 1.3 encrypts the certificate, improving privacy. In many deployments, the SNI (Server Name Indication) value in the ClientHello still reveals the hostname. Encrypted Client Hello, standardised in RFC 9849, can hide the real ClientHello and SNI when the client, DNS records, and server infrastructure support it.
TLS 1.3 also mandates forward secrecy. Every connection uses a fresh key exchange (Diffie-Hellman). If a server's long-term private key is compromised later, previously recorded traffic cannot be decrypted. TLS 1.2 allowed RSA key exchange, which did not provide forward secrecy.
Forward secrecy and the one round trip handshake settle how the encrypted channel is built. What travels inside it is decided by the HTTP version, and each generation of HTTP was written to remove a different bottleneck in that channel.
7.5 HTTP/1.1, HTTP/2, and HTTP/3
HTTP/1.1 (RFC 9112) sends requests as plain text, one at a time per connection. Browsers open 6 to 8 parallel connections to the same server to work around this limitation. Connection reuse (keep-alive) is the default, which avoids repeating the TCP and TLS handshakes for every request.
HTTP/2 (RFC 9113) uses binary framing and multiplexes many requests over a single TCP connection using streams. Headers are compressed with HPACK, reducing redundant data. The downside: a single lost TCP packet blocks all streams because TCP guarantees in-order delivery. This is called head-of-line blocking.
HTTP/3 (RFC 9114) replaces TCP with QUIC (RFC 9000), a UDP-based transport that integrates TLS 1.3 encryption. Each QUIC stream is independently ordered, so a lost packet on one stream does not block the others. QUIC also supports : if your phone switches from Wi-Fi to cellular, the QUIC connection survives (identified by a Connection ID, not the IP 4-tuple).
All major browsers support HTTP/3, and large CDNs and internet platforms deploy it widely. The operational point is not a single traffic percentage; it is that modern request diagnosis must recognise both HTTPS over TCP and HTTP/3 over QUIC paths.
Parallel connections, multiplexed streams and independent stream ordering all make the second and later requests cheaper. None of them removes the setup the very first request has to pay for, which is where the whole waterfall becomes visible at once.
7.6 Why cold requests usually feel slower
A cold request to a new server usually pays every setup cost upfront: DNS resolution with no cache, TCP handshake on a new connection, TLS handshake with no session ticket, and a full HTTP response with no cached object. On a 100 ms round-trip path, those setup costs can add hundreds of milliseconds before a single byte of content arrives.
Subsequent requests benefit from caching at every layer. DNS answers are cached (per the TTL). The TCP connection stays open (keep-alive). TLS sessions can be resumed in 0-RTT with TLS 1.3. HTTP responses are cached if the server sends appropriate Cache-Control headers.
The word "usually" matters. The connection dance in section 7.2 already removes part of that bill: a pooled HTTP/3 connection skips setup entirely, an HTTPS record can save a wasted first connection over the wrong protocol, and a browser that preconnects starts the lookup and the race before the user clicks anything. The fundamentals do not change; what changes is which part of the setup path the user pays for at the moment of the click.
(Content Delivery Networks) like Cloudflare, Akamai, and AWS CloudFront reduce first-request latency by serving content from edge servers near the user. Instead of a 100ms round trip to a distant origin, the CDN edge might be 5-10ms away. The CDN also terminates TLS at the edge, so the handshake completes quickly even if the origin server is far away.
Common misconception
“A slow website means the server is slow.”
Time to first byte (TTFB) includes DNS, TCP, TLS, and server processing. A 300ms TTFB does not mean the server took 300ms. It might mean DNS took 80ms, TCP took 50ms, TLS took 50ms, and the server only needed 20ms. Measuring each step separately tells you where the time actually goes.
A browser opens example.com for the first time in 2026. Which order matches what it actually does?
A user sees ERR_CONNECTION_TIMED_OUT in their browser. Which step in the request sequence failed?
You can reach a website by IP address but not by hostname. Where is the failure?
TLS 1.3 reduced the handshake from 2 round trips to 1. Why does this matter?
HTTP/2 multiplexes many requests over one TCP connection. Why does HTTP/3 use QUIC instead of TCP?
Core distinctions
- A cold HTTPS-over-TCP request follows DNS, TCP, TLS, then HTTP. Warm connections, HTTP/3, preconnect, and resumption can skip or combine parts of that setup path.
- DNS now answers how to connect as well as where: an HTTPS record can carry ALPN hints, address hints and ECH keys, the client races IPv6 against IPv4, and an h3 hint replaces the TCP and TLS handshakes with one QUIC exchange on UDP 443.
- Each step produces a distinct error when it fails. ERR_NAME_NOT_RESOLVED = DNS. ERR_CONNECTION_TIMED_OUT = TCP. Certificate warning = TLS. 500/502/503 = HTTP/server.
- Cold requests are usually slower because DNS, transport setup, TLS, and HTTP cache state are not warm yet. Subsequent requests reuse cached answers, pooled connections, TLS tickets, and cached responses.
- TLS 1.3 halved the handshake latency and removed insecure features. HTTP/3 over QUIC eliminated head-of-line blocking and added connection migration.
Standards and sources cited in this module
RFC 8446, The Transport Layer Security (TLS) Protocol Version 1.3
Section 2, Protocol Overview
Defines the 1-RTT handshake, mandatory forward secrecy, and 0-RTT resumption. Referenced in Section 7.3.
Section 15, Status Codes
Defines HTTP status codes (200, 403, 404, 500, 502, 503). Referenced in Sections 7.1 and 7.2.
Section 5, Streams and Multiplexing
Defines HTTP/2 binary framing and stream multiplexing. Referenced in Section 7.4.
Full specification
Defines HTTP/3 over QUIC, eliminating TCP head-of-line blocking. Referenced in Section 7.4.
RFC 9000, QUIC: A UDP-Based Multiplexed and Secure Transport
Section 2, Streams
Defines independent stream ordering and connection migration. Referenced in Section 7.4.
RFC 9849, TLS Encrypted Client Hello
Abstract and protocol overview
Defines ECH, which changes the assumption that SNI is always visible during TLS setup. Referenced in Section 7.3.
RFC 8305, Happy Eyeballs Version 2
Section 1, Introduction
Defines the connection racing behaviour browsers and clients use to reduce delay across IPv6 and IPv4 paths. Referenced in Section 7.5.
RFC 9460, Service Binding and Parameter Specification via the DNS
Abstract and Section 1
Defines SVCB and HTTPS DNS records that can publish connection parameters before transport setup. Referenced in Section 7.5.
Sectigo AddTrust Root Certificate Expiry, May 30, 2020
Industry incident analysis
Real-world TLS failure caused by an expired root CA certificate. Used as the opening case study.
CompTIA Network+ N10-009 Exam Objectives
Domain 5.0, Network Troubleshooting (24% of exam)
Tests systematic troubleshooting across OSI layers, including request path diagnosis.
You have traced the complete request path. Module 8, the Foundations capstone, puts it all together into one practical skill: writing a four-part diagnosis note that tells a colleague exactly where to look and what to check next.
Module 9 of 45 in Foundations