Security Notes
Start here

What Happens When You Type https://example.com

The classic interview question, answered end to end: from the keystroke to pixels on screen, with the security checks at every hop. Each stage links to the deep dive that covers it in full — DNS, TLS, TCP/IP, HTTP.

23 min read 13 sections 8 model answers verified 2026-10

Last verified2026-10


What is this?

When you press Enter on https://example.com, the browser has to answer four questions in order: where is it? (DNS turns the name into an IP address), how do I reach it? (a TCP or QUIC connection across the internet), is it really them, and can anyone listen in? (TLS proves the server's identity with a certificate and agrees encryption keys), and what do they want me to show? (an HTTP request, then parsing and rendering the response).

Interviewers ask this because there is no bottom to it. A junior answer names the four steps. A senior answer explains what is cached where, what each step costs in round trips, what an attacker could do at each hop, and which control stops them.

The whole journey on a cold load (nothing cached)
  1. Parse the input, check HSTS and cachesbrowser~0 ms

    It's a URL, not a search. https is explicit, and HSTS would upgrade it anyway. No service worker or cached copy yet.

  2. Resolve example.com → IP addressdns0–100 ms

    Browser cache → OS stub resolver → recursive resolver → root → .com → authoritative. A, AAAA and HTTPS records are queried in parallel.

  3. Validate DNSSEC (at the resolver)dnsin parallel

    The recursive resolver checks RRSIG signatures up the chain of trust to the root key. The browser just trusts the AD bit.

  4. Pick an address and connectnetwork1 RTT

    Happy Eyeballs races IPv6 and IPv4. TCP three-way handshake to port 443, or QUIC over UDP 443 if HTTP/3 is advertised.

  5. TLS 1.3 handshaketls1 RTT

    ClientHello with SNI, ALPN and a hybrid post-quantum key share. The server returns its certificate, a signature proving it holds the private key, and Finished.

  6. Validate the certificatebrowserlocal, ~ms

    Chain to a trusted root, check signatures, dates, hostname vs SAN, EKU, revocation, and Certificate Transparency proofs.

  7. Send the HTTP request and get the responseserver1 RTT + server time

    HTTP/2 HEADERS frame: GET /, :authority example.com, Sec-Fetch-* headers. The CDN edge answers from cache or fetches from the origin.

  8. Apply response security policybrowserlocal

    Status, redirects, HSTS, CSP, MIME type, cookies. Site Isolation picks the renderer process for this site.

  9. Parse, lay out, paintrender10s of ms

    HTML → DOM, CSS → CSSOM, render tree, layout, paint, composite. Subresources reuse the same connection.


Why it matters

It tests breadth fast.

One question touches DNS, routing, TCP, cryptography, PKI, HTTP, browser security models and rendering. The interviewer learns in five minutes where your knowledge is solid and where it's thin.

Every hop is an attack surface.

DNS spoofing, BGP hijacks, TLS downgrades, mis-issued certificates, cookie theft and XSS all live on this path. A security engineer should be able to name the attack and the control at each step.

It shows you can pick the right altitude.

Starting with the 30-second version and then asking "which part do you want me to go deep on?" is itself a signal of seniority.

Memory hook

"Where, How, Who, What"Where is it (DNS) → How do I get there (TCP/QUIC) → Who am I talking to, privately (TLS + certificate) → What do I show (HTTP + rendering). Hang every detail off one of those four hooks and you'll never lose your place mid-answer.


Step 1 — The browser parses what you typed

Before any packet leaves the machine, the browser does a surprising amount of local work.

  1. Omnibox: URL or search?browser

    https://example.com has a scheme and a valid host, so it's a navigation, not a search query. While you typed, the browser may already have pre-resolved DNS or pre-connected to its top suggestion.

  2. Normalise the URLbrowser

    Lowercase the host. Convert international domain names to Punycode (bücher.de → xn--bcher-kva.de). Apply the default port 443. Mixed-script names are shown as Punycode to blunt homograph phishing.

  3. HSTS checkbrowser

    If the host is on the HSTS preload list compiled into the browser, or has sent Strict-Transport-Security before, any http:// is rewritten to https:// before a connection is made, so there's no plaintext request to strip.

  4. Look for an existing answerbrowser

    Service worker for this origin? (Not on a first visit.) HTTP cache entry that is still fresh? An already-open HTTP/2 or HTTP/3 connection that can be reused or coalesced (same IP and the certificate covers this name)?

  5. Hand off to the network serviceos

    In Chrome the network stack runs in its own sandboxed process. Navigation is managed by the browser process; the page will later be committed to a renderer process for this site only (Site Isolation).

Tip

Typing example.com without a scheme is a better interview variant: then you get to explain HTTPS-First / "Always use secure connections" mode and HSTS preload. Without them, the first request goes out as plaintext http:// and an on-path attacker can "SSL-strip" it.


Step 2 — DNS: turning the name into an address

The cache cascade

Each layer only asks the next one if it doesn't already have a fresh answer (one whose TTL — time to live — hasn't expired).

Where the answer can come from — each layer asks the next only on a miss
  1. Browser host cachebrowser~1 min TTL cap

    Chrome keeps its own short-lived cache of recent lookups (inspect at chrome://net-internals/#dns).

  2. OS stub resolveros/etc/hosts first

    Hosts file, then the OS cache (systemd-resolved, mDNSResponder, Windows DNS Client), then forwards to the configured resolver.

  3. Recursive resolverdnscache shared by many users

    ISP, 1.1.1.1, 8.8.8.8 or a corporate resolver. Most queries end here because popular names are already cached.

  4. Root servers → referral to .comdns13 names, ~1,900 anycast sites

    The root doesn't know the answer, only who runs .com.

  5. .com TLD servers → referral to example.com's name serversdns

    Returns the NS records (and, with DNSSEC, the signed DS record) for example.com.

  6. Authoritative server → the answerdnsfinal hop

    Returns A / AAAA / HTTPS records plus their RRSIG signatures. The resolver validates, caches for the TTL, and returns the answer with the AD bit.

OS stub resolver.

Linux checks /etc/hosts and nsswitch.conf, and often uses systemd-resolved on 127.0.0.53. macOS uses mDNSResponder. Windows uses the DNS Client service. An attacker who can edit the hosts file wins this step without touching the network.

Encrypted DNS.

If DNS over HTTPS (DoH) or DNS over TLS (DoT) is on, the query to the recursive resolver is encrypted. Otherwise it's plain UDP port 53, readable and spoofable by anyone on the path (Wi-Fi, ISP).

Three queries in parallel.

Modern browsers ask for A (IPv4), AAAA (IPv6) and HTTPS records (type 65, RFC 9460). The HTTPS record can say "I speak HTTP/3" (alpn=h3), give address hints, and carry the ECH config used to encrypt the ClientHello later.

What goes on the wire

text
;; QUESTION — client → recursive resolver (UDP 53, random source port, random 16-bit ID)
example.com.            IN  A        ; EDNS0, DO bit set = "send me DNSSEC records"

;; ANSWER — recursive resolver → client
example.com.     300    IN  A        192.0.2.10      ; documentation address (RFC 5737), illustrative
example.com.     300    IN  RRSIG    A 13 2 300 ( ... signature by example.com's ZSK ... )
;; flags: qr rd ra ad      ← "ad" = Authenticated Data: the resolver validated DNSSEC

The recursive resolver walks the hierarchy one referral at a time. With QNAME minimisation (RFC 9156) it only tells the root "who runs .com?" rather than leaking the full name to every server.


Step 2b — DNSSEC: proving the answer wasn't forged

What it isDNS Security Extensions (DNSSEC) add signatures to DNS records so a resolver can prove an answer really came from the zone owner and wasn't changed on the way. It gives authenticity and integrity, not confidentiality: the query and answer are still readable.

How the chain of trust worksEach zone signs its own records, and the parent zone vouches for the child's key. Validation walks up until it reaches the one key everyone has pre-installed: the root key.

Validating example.com's A record — read bottom-up in practice, shown here top-down from the trust anchor
  1. Root KSK (trust anchor)Root zonepre-installed

    The resolver ships with this key. Everything else is trusted only because it chains back here.

  2. Root DNSKEY set, signed by the root KSKRoot zone

    Contains the root ZSK, which signs the records in the root zone.

  3. DS record for .com, signed by the root ZSKRoot zone

    A hash of .com's KSK. This is the link from root to .com.

  4. .com KSK, which hashes to that DS record.com zone

    The resolver hashes .com's KSK and compares it with the DS. A match means "the root vouches for this key".

  5. DS record for example.com, signed by .com's ZSK.com zone

    The same pattern one level down: the parent publishes a signed hash of the child's KSK.

  6. example.com KSK → DNSKEY set → ZSKexample.com

    Hashes to the DS in .com. The KSK signs the DNSKEY set, which contains the ZSK.

  7. RRSIG over the A record, made with the ZSKexample.com✅ AD bit

    Verifies example.com A 192.0.2.10. Every link checked, so the resolver marks the answer as authenticated.

RRSIG

The signature over one record set (e.g. all A records for a name). Has an inception and expiry time.

DNSKEY

The zone's public keys. The ZSK (zone-signing key) signs records; the KSK (key-signing key) signs the DNSKEY set.

DS

Delegation Signer: a hash of the child's KSK, published and signed in the parent zone. This is the link between zones.

NSEC / NSEC3

Signed proof that a name does not exist, so "NXDOMAIN" can't be forged. NSEC3 hashes names to make zone-walking harder.

AD bit

"Authenticated Data" flag the resolver sets after successful validation. A stub resolver just trusts it.

Trust anchor

The root KSK, distributed with resolver software (KSK-2017, with the KSK-2024 rollover in progress).

Important

Browsers do not validate DNSSEC themselvesValidation happens at the recursive resolver, and the browser trusts the AD bit. So the last hop (laptop → resolver) is only protected if it is encrypted (DoH/DoT) or local. DNSSEC is also not what stops a spoofed IP from becoming a working MITM: TLS certificate validation does that. A forged DNS answer sends you to the wrong server, but that server can't present a valid certificate for example.com.

Full detail on key rollovers, NSEC3 zone walking and DNSSEC's downsides: DNS Deep Dive → DNSSEC.


Step 3 — Reaching the server: routing, Happy Eyeballs, TCP or QUIC

  1. Choose the address familynetwork

    Happy Eyeballs v2 (RFC 8305): start the IPv6 connection, and if it hasn't succeeded within ~250 ms, race IPv4 in parallel. The first to finish wins, so broken IPv6 never stalls a page.

  2. First hopnetwork

    The OS routing table says "not local, send to the default gateway". ARP (IPv4) or Neighbor Discovery (IPv6) finds the gateway's MAC address. The home router NATs the private source address to a public one.

  3. Across the internetnetwork

    BGP routes the packet between networks (autonomous systems). Big sites use anycast: the same IP is announced from hundreds of CDN locations, so you reach the nearest edge.

  4. TCP three-way handshakenetwork1 RTT

    SYN → SYN-ACK → ACK to port 443. Options: MSS, window scaling, SACK, timestamps. The initial sequence number is random (RFC 6528) so off-path attackers can't inject.

  5. Or QUIC (HTTP/3)network0 extra RTT

    If the HTTPS DNS record or a previous Alt-Svc header advertised h3, the browser runs QUIC over UDP 443. Transport and TLS 1.3 handshakes are combined, saving a round trip.

Round-trip budget before the first byte of HTML (cold, HTTP/2 over TCP)
DNS (uncached)1 RTT+
TCP handshake1 RTT
TLS 1.31 RTT
HTTP request1 RTT
DNS (uncached)
Several hops via the recursive resolver; often 20–100 ms
TCP handshake
SYN / SYN-ACK; the ACK is sent along with the ClientHello
TLS 1.3
ClientHello → ServerHello…Finished
HTTP request
GET → first bytes of response (+ server think time)

With HTTP/3 the TCP and TLS round trips merge into one, and with TLS 1.3 0-RTT resumption a returning visitor can send the GET in the very first flight.


Step 4 — The TLS 1.3 handshake

The goal: agree on fresh encryption keys that only the two endpoints know, and prove the server is the real example.com, in a single round trip.

sequenceDiagram
  autonumber
  participant B as Browser
  participant S as example.com (CDN edge)
  B->>S: ClientHello<br/>SNI example.com · ALPN h2<br/>key_share X25519MLKEM768 · sig algs
  Note over B,S: Plaintext so far (except ECH inner hello)
  S->>B: ServerHello<br/>TLS_AES_128_GCM_SHA256 · key_share
  Note over B,S: Both derive handshake keys (ECDHE + HKDF)<br/>everything below is encrypted
  S->>B: EncryptedExtensions (ALPN h2)
  S->>B: Certificate<br/>leaf + intermediate, SCTs
  S->>B: CertificateVerify<br/>signature over transcript
  S->>B: Finished (MAC over transcript)
  Note over B: Validate cert chain,<br/>signature, Finished
  B->>S: Finished
  B->>S: HTTP/2 SETTINGS + GET /
  S-->>B: NewSessionTicket (resumption)
What the browser puts in its ClientHello (abridged)
legacy_version2 B
random32 B
cipher_suitesvar
server_name (SNI)var
supported_versionsvar
key_share~1.2 KB
signature_algorithmsvar
ALPNvar
encrypted_client_hellovar
legacy_version
Always 0x0303 ("TLS 1.2") for middlebox compatibility; the real version is in supported_versions
random
Fresh randomness; feeds the key schedule and prevents replay
cipher_suites
TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256
server_name (SNI)
"example.com", so a server hosting many sites picks the right certificate. Visible to the network unless ECH is used
supported_versions
0x0304 (TLS 1.3), 0x0303 (TLS 1.2)
key_share
Hybrid X25519MLKEM768 (classical + post-quantum) and plain X25519, sent up front so no extra round trip is needed
signature_algorithms
ecdsa_secp256r1_sha256, rsa_pss_rsae_sha256, …: what the server may sign with
ALPN
h2, http/1.1: which application protocol runs inside the tunnel
encrypted_client_hello
The real ClientHello (incl. SNI), encrypted to a key from the HTTPS DNS record; a GREASE dummy if no config

Why each server message matters:

ServerHello

Picks the cipher suite and returns the server's key share. From here both sides derive the same secret without ever sending it (Diffie–Hellman).

Certificate

Encrypted in TLS 1.3, so a passive observer can't see which certificate (site) was served.

CertificateVerify

The server signs the handshake transcript with the certificate's private key. This proves it holds the key, not just a copy of the public certificate.

Finished

A MAC over everything exchanged. If an attacker tampered with any earlier message (e.g. to force a weaker cipher), the Finished check fails.

Byte-level detail, the key schedule, PSK resumption and 0-RTT are in the TLS in depth section.


Step 5 — How the browser validates the certificate

This is the step that actually defeats a man-in-the-middle (MITM) attacker. A DNS spoof or a BGP hijack can send you to the wrong server, but that server can't produce a certificate for example.com signed by a CA the browser trusts — plus a CertificateVerify signature made with the matching private key.

The checks, in order — any failure is a hard error (non-bypassable under HSTS)
  1. Build a chain to a trusted rootPath

    The server sends leaf + intermediates. Missing intermediates come from a cache or the AIA URL. The chain must end at a root in the browser's root store.

    • ❌ NET::ERR_CERT_AUTHORITY_INVALID: unknown or self-signed issuer
  2. Verify every signature on the chainCrypto

    Each certificate's signature must verify with its issuer's public key, using an allowed algorithm (no SHA-1, no MD5) and key size (RSA ≥ 2048).

    • ❌ invalid signature / weak key
  3. Check validity dates for every certificateTime

    Now must fall between notBefore and notAfter. A wrong system clock produces this error too.

    • ❌ ERR_CERT_DATE_INVALID
  4. Match the hostname against the SANName

    example.com must appear in the Subject Alternative Name list. The Common Name is ignored. A wildcard covers one label only.

    • ❌ ERR_CERT_COMMON_NAME_INVALID
  5. Check constraints and key usagePolicy

    Issuers need CA:TRUE and must respect pathLenConstraint and nameConstraints. The leaf needs EKU serverAuth and a compatible keyUsage.

    • ❌ constraint / usage violation
  6. Check the certificate isn't revokedRevocation

    Chrome: CRLSet pushed with updates. Firefox: CRLite. Optionally a stapled OCSP response from the server.

    • ❌ ERR_CERT_REVOKED
  7. Require Certificate Transparency proofsCT

    Enough valid SCTs (signed timestamps from independent public logs), embedded in the cert or delivered in the handshake.

    • ❌ ERR_CERTIFICATE_TRANSPARENCY_REQUIRED
  8. Verify CertificateVerify with the leaf's public keyPossession✅ padlock

    Proves the server holds the private key right now, bound to this handshake's transcript. Only then are the session keys trusted.

flowchart TB
  L["Leaf<br/>CN/SAN: example.com<br/>CA:FALSE · EKU serverAuth<br/>valid ≤ 200 days"] -->|"signed by"| I["Intermediate CA<br/>CA:TRUE, pathLen 0"]
  I -->|"signed by"| R["Root CA<br/>self-signed<br/>in the browser's root store"]
  R -.->|"trusted because it's<br/>pre-installed"| T["Chrome Root Store /<br/>Mozilla NSS / Apple"]
Path building

The server should send leaf + intermediates. Browsers can fill gaps from a cache or the AIA (Authority Information Access) URL. There may be several valid paths (cross-signed roots).

Hostname match

Only the Subject Alternative Name counts; Chrome stopped using the Common Name in 2017. A wildcard *.example.com covers exactly one label: a.example.com, not a.b.example.com or example.com.

Constraints

Issuers must have basicConstraints CA:TRUE; pathLenConstraint limits depth; nameConstraints can restrict a CA to certain domains; EKU must include serverAuth.

Revocation

Chrome uses CRLSets pushed with updates. Firefox uses CRLite (compressed lists of all revoked certs). Live OCSP is largely abandoned for privacy and reliability. Let's Encrypt shut its OCSP service down in 2025.

Certificate Transparency

The certificate must carry SCTs: signed promises from public CT logs that it was logged. That makes a mis-issued certificate for your domain discoverable.

Lifetime

Maximum public TLS certificate validity is 200 days from March 2026, falling to 100 days (2027) and 47 days (2029) under CA/Browser Forum ballot SC-081.

Warning

Corporate TLS inspection breaks this model on purpose. A proxy presents its own certificate for example.com, signed by a corporate root that IT pushed into the OS trust store. The browser accepts it because the root is "trusted". This is why endpoint trust stores are crown jewels, and why attackers who install a root CA (malware, a rogue MDM profile) get silent MITM.


Step 6 — The HTTP request and the server side

Inside the encrypted tunnel, HTTP/2 sends binary frames. Decoded, the first request looks like this:

http
:method: GET
:scheme: https
:authority: example.com
:path: /
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 ... Chrome/1xx
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-encoding: gzip, deflate, br, zstd
accept-language: en-GB,en;q=0.9
sec-fetch-site: none          ← typed by the user: not triggered by another site
sec-fetch-mode: navigate
sec-fetch-dest: document
sec-fetch-user: ?1
upgrade-insecure-requests: 1
priority: u=0, i

No cookies are sent on a first visit. On later visits, cookies for example.com ride along unless their SameSite, Secure or Path rules exclude them.

  1. CDN edge (anycast PoP)server

    Terminates TLS, applies WAF and bot rules (often using the JA4 TLS fingerprint), checks its cache.

  2. Cache miss → originserver

    A new, separate TLS connection from the edge to the origin load balancer. Origin TLS is often mTLS (mutual TLS) or authenticated-origin-pull so the origin only accepts the CDN.

  3. Load balancer → appserver

    Routes by host and path. May re-encrypt to the service mesh (mTLS between pods).

  4. Responseserver

    200 OK, content-type: text/html, content-encoding: br, cache-control, and security headers: strict-transport-security, content-security-policy, x-content-type-options: nosniff, set-cookie.


Step 7 — The browser applies policy, then renders

  1. Read the response headers firstbrowser

    Redirect? Follow it (and re-check HSTS). Strict-Transport-Security is only honoured over valid HTTPS. Store cookies according to their attributes. nosniff forbids MIME guessing.

  2. Commit to a renderer processos

    With Site Isolation, example.com gets a sandboxed renderer process of its own, so a compromised page can't read another site's memory (Spectre defence).

  3. Parse HTML → DOMrender

    Streaming tokenizer. The preload scanner looks ahead for <link>, <script>, <img> and starts fetching early. Classic <script> blocks parsing; defer and async don't.

  4. CSS → CSSOMrender

    CSS is render-blocking: nothing paints until the stylesheet that applies is loaded.

  5. Style → layout → paint → compositerender

    Compute styles, calculate geometry (layout), draw into layers (paint), and let the GPU process combine them (composite). First Contentful Paint.

  6. Subresourcesnetwork

    Same-origin assets reuse the HTTP/2 connection (multiplexed streams). Third-party origins repeat DNS → connect → TLS, unless preconnected. CSP decides which origins are allowed at all.


Security angle — attacks and controls at every hop

StageWhat an attacker triesWhat stops it
Typing the URLTyposquatting, IDN homograph (exаmple.com with Cyrillic а)Punycode display rules, Safe Browsing, password-manager origin matching
First requestSSL stripping: intercept http:// and never upgradeHSTS + preload, HTTPS-First mode
Local resolutionEdit hosts file, rogue DHCP pushing a malicious DNS serverEndpoint integrity monitoring, DoH to a known resolver
DNS on the wireSpoofed answers, cache poisoning (Kaminsky 2008)Source-port + ID randomisation, 0x20 case, DNSSEC at the resolver, DoH/DoT
RoutingBGP hijack to reroute the IP rangeRPKI route origin validation; TLS still stops content tampering
TCPOff-path RST or data injectionRandom ISNs, RFC 5961 challenge ACKs, then TLS integrity
TLS negotiationDowngrade to weak version/cipherTLS 1.3 transcript-bound Finished, downgrade sentinel in ServerHello.random, no weak suites
CertificateMis-issued or stolen certificate, rogue CARoot program policy, CT logs + monitoring, CAA records, short lifetimes, revocation
SNI visibilityCensorship / surveillance by hostnameEncrypted Client Hello (ECH)
HTTPSession hijack, CSRFSecure, HttpOnly, SameSite cookies, Sec-Fetch-* checks
RenderingXSS, clickjacking, MIME confusionCSP, frame-ancestors, nosniff, Site Isolation
Memory hook

"DNS points, TLS proves." DNS (even with DNSSEC) only tells you where to go. TLS certificate validation is what proves you arrived at the right place. When asked "what if DNS is poisoned?", the answer is: you connect to the wrong IP, and the attacker fails at the certificate step, unless they also have a trusted certificate for the name.


How to deliver the answer

30 seconds

"The browser resolves example.com via DNS, opens a TCP connection to port 443, runs a TLS 1.3 handshake where it checks the server's certificate chains to a trusted root and matches the name, then sends an HTTP GET inside the tunnel and renders the HTML it gets back."

2 minutes

Add the caches (browser, OS, resolver), the root → TLD → authoritative walk, the 1-RTT TLS 1.3 handshake with key shares, certificate checks (chain, SAN, dates, revocation, CT), HTTP/2 multiplexing, and the DOM/CSSOM → paint pipeline.

Deep dive

Offer a branch: "I can go deeper on DNSSEC, on the TLS key schedule, on certificate validation and revocation, or on browser rendering and isolation — which is most useful?"

Tip

Draw it while you talk: four boxes (DNS · TCP · TLS · HTTP) with arrows, and put a red "attack" and a green "control" label under each one. Interviewers remember a candidate who structures the answer visually.


Interview Questions

Q
Walk me through what happens when you type https://example.com and press Enter.
Model answer

The browser first checks local state: it's a URL not a search, HSTS and caches are consulted, and an existing connection is reused if one exists. Then DNS resolves the name through the browser and OS caches to a recursive resolver, which walks root, .com and the authoritative server and ideally validates DNSSEC. The browser races IPv6 and IPv4, completes a TCP handshake to 443, and runs a one-round-trip TLS 1.3 handshake in which the server proves its identity with a certificate chain and a signature over the handshake. Once the certificate checks out — chain to a trusted root, hostname in the SAN, valid dates, not revoked, CT-logged — the browser sends an HTTP/2 GET, applies the response's security headers, and parses, lays out and paints the page. The security-critical step is certificate validation: that's what defeats a DNS or routing attacker.

Q
If an attacker poisons your DNS and points example.com at their server, what happens?
Model answer

The browser connects to the attacker's IP and starts TLS, but the attacker can't present a certificate for example.com that chains to a trusted root, and even with a copy of the real certificate they can't produce the CertificateVerify signature without the private key. So the browser shows a hard certificate error, and with HSTS the user can't even click through. The attack only succeeds if the attacker also has a trusted certificate for the name — via a compromised or coerced CA, a stolen key, or a root they installed on the victim's machine — which is exactly what Certificate Transparency monitoring and CAA records are meant to catch.

Q
Does the browser validate DNSSEC?
Model answer

Generally no. Validation is done by the recursive resolver, which checks RRSIG signatures up the chain of DS and DNSKEY records to the root trust anchor and then sets the AD bit; the browser's stub resolver simply trusts that bit. That leaves the last hop from the laptop to the resolver unprotected unless it's encrypted with DoH or DoT. In practice the browser relies on TLS certificate validation, not DNSSEC, to know it reached the right server; DNSSEC mainly protects resolvers from cache poisoning and enables things like DANE in mail.

Q
How many round trips does it take before the first byte of HTML arrives, and how can you reduce them?
Model answer

On a cold load over HTTP/2 it's roughly one or more for DNS, one for TCP, one for TLS 1.3 and one for the request itself — about four round trips, so on a 50 ms path around 200 ms before server think time. HTTP/3 over QUIC merges the transport and TLS handshakes to save one; TLS 1.3 session resumption with 0-RTT lets a returning client send the GET in its first flight; DNS caching, preconnect hints and connection reuse or coalescing remove the rest. The catch with 0-RTT is that early data can be replayed, so it's only safe for idempotent requests.

Q
What is SNI, why does it leak, and what fixes it?
Model answer

Server Name Indication is a ClientHello extension carrying the hostname, so a server hosting many sites on one IP knows which certificate to present. Because the ClientHello is sent before any keys exist, SNI is plaintext and lets ISPs, firewalls and censors see exactly which site you're visiting even though TLS 1.3 encrypts the certificate. Encrypted Client Hello fixes it: the browser fetches the server's ECH public key from the HTTPS DNS record and encrypts the real ClientHello, including SNI, inside an outer hello that only shows a shared front-end name — which is why ECH pairs naturally with encrypted DNS.

Q
Why do browsers ignore the Common Name in certificates?
Model answer

Because the Subject Alternative Name extension is the standardised, unambiguous place for hostnames, while the CN is a free-text field whose interpretation varied between clients and invited parsing tricks. RFC 6125 already said to prefer SAN, and Chrome dropped CN matching entirely in 2017 (Chrome 58), with other browsers following. A certificate whose hostname is only in the CN now fails with a name-mismatch error, and wildcards only match a single left-most label.

Q
How do browsers check revocation today, given OCSP is being abandoned?
Model answer

Live OCSP leaked every site you visited to the CA and was soft-fail, so an attacker who blocked the OCSP request bypassed it anyway. Today Chrome ships CRLSets, a curated revocation list pushed with browser updates, and Firefox ships CRLite, a compressed filter covering all revoked publicly trusted certificates, both checked locally with no privacy leak. Servers may still staple an OCSP response in the handshake, but Let's Encrypt shut down its OCSP service in 2025 and the CA/Browser Forum made OCSP optional. The industry's real answer is short-lived certificates: lifetimes drop to 47 days by 2029, which shrinks the window in which a stolen key is useful.

Q
What does HSTS protect against, and what's its weakness?
Model answer

HSTS tells the browser to only ever use HTTPS for a domain for max-age seconds and to make certificate errors non-bypassable, which kills SSL-stripping attacks where an attacker intercepts the first plaintext http request. Its weakness is trust-on-first-use: the very first visit, or the first after the policy expires, can still be stripped because the browser hasn't seen the header yet. The HSTS preload list closes that gap by shipping the policy inside the browser, but preloading is hard to undo, so includeSubDomains must be safe for every subdomain before you submit.