Skip to lesson

Mini project: trace a web request end to end

A request trace is a written record of one request's whole journey, backed by real evidence: the DNS answer, the connection and TLS lines, the HTTP request and response, and the time each step took.

What you'll build

You start from nothing but a terminal and a browser. Pick a site (start with https://example.com, then try one you use daily) and collect evidence for every step this module covered: its addresses from DNS, a curl -v trace saved to a file, a timing breakdown, and the same page load recorded in the browser's Network tab and exported as a HAR file (a JSON file of every request in a page load).

Then write a README that explains the trace line by line in your own words, labelling each line DNS, TCP, TLS or HTTP. The result is a small repository that shows you can explain how the web works from real data, not from memory.

Sample run (Windows curl; your addresses, dates and IDs will differ)
$ curl -sv https://example.com -o page.html 2> curl-trace.txt
$ cat curl-trace.txt
* Host example.com:443 was resolved.
* IPv6: 2606:4700:10::ac42:93f3, 2606:4700:10::6814:179a
* IPv4: 104.20.23.154, 172.66.147.243
*   Trying [2606:4700:10::ac42:93f3]:443...
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* ALPN: server accepted http/1.1
* Established connection to example.com (2606:4700:10::ac42:93f3 port 443) from 2001:db8::25 port 52201
* using HTTP/1.x
> GET / HTTP/1.1
> Host: example.com
> User-Agent: curl/8.21.0
> Accept: */*
>
* Request completely sent off
* schannel: remote party requests renegotiation
* schannel: renegotiating SSL/TLS connection
* schannel: SSL/TLS connection renegotiated
< HTTP/1.1 200 OK
< Date: Fri, 16 Oct 2026 04:47:37 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Server: cloudflare
< last-modified: Tue, 13 Oct 2026 22:05:48 GMT
< allow: GET, HEAD
< Accept-Ranges: bytes
< Age: 9486
< cf-cache-status: HIT
< CF-RAY: a4b46d308d2a9a16-MAA
< alt-svc: h3=":443"; ma=86400
<
{ [589 bytes data]
* Connection #0 to host example.com:443 left intact
$ cat timing.txt
dns lookup:  0.031083s
tcp connect: 0.055130s
tls done:    0.113599s
first byte:  0.135287s
total:       0.136251s

Requirements

  • 1dns.txt holds the nslookup (or dig) answer for the site, with every IPv4 and IPv6 address.
  • 2curl-trace.txt holds the full curl -sv output of one request to the site.
  • 3timing.txt holds the DNS, connect, TLS, first-byte and total times from curl -w.
  • 4example.com.har holds the same page load recorded in browser dev tools, with no cookies or tokens in it.
  • 5The README labels every kind of line in the trace as DNS, TCP, TLS or HTTP and explains it in your own words.
  • 6The README turns the cumulative curl times into the time of each phase and names the slowest one.
  • 7Generated files such as page.html are kept out of Git with .gitignore.

Milestones

0/5 done · commit and push after each one
  1. Resolve the name and save the answer

    dns.txt lists every address of the site, and you know which resolver answered.

  2. Capture a full curl -v trace

    curl-trace.txt contains the resolved, Trying, TLS, > and < lines of one request.

  3. Time every phase

    timing.txt shows five times, and you have worked out the length of each phase.

  4. Record the page load in dev tools and export a HAR file

    example.com.har is in the folder, and you know how many requests the page made.

  5. Write the trace report and push it

    A public web-request-trace repository with the four evidence files and a README that explains every step.

Build it in your own GitHub repository and push after each milestone. When everything works, mark the project as complete.

Extra challenges (optional)

Do any you like, each on its own branch, so your main project keeps working.

  1. Trace a second site you use daily (your college website, a news site) and add a section comparing it with example.com: number of requests, slowest phase, HTTP version.· easy

  2. Repeat the curl trace with two URLs in one command and show in the README that the second request reused the connection.· medium

  3. Add a "certificate" section: print the site's certificate subject, issuer and dates with openssl and draw its chain from depth=0 to the root.· medium

  4. Add a "failures" section: trigger and explain one DNS error, one refused connection, one timeout and one certificate error, with the real messages.· hard

Solution

Opens when you add your repository link.

Finish up

Mark complete & continue

Next: Request line, headers and body