How a Website Request Works

July 16, 2026 ยท View on GitHub

Publishing a website connects several independent layers.

From URL to Page

For https://www.example.dpdns.org/about/, the browser interprets:

Scheme:   https
Hostname: www.example.dpdns.org
Port:     443 by default
Path:     /about/

The browser then:

  1. Resolves the hostname through DNS.
  2. Connects to the returned IP address.
  3. Negotiates TLS for HTTPS.
  4. Sends an HTTP request containing the hostname and path.
  5. Receives an HTTP response.
  6. Parses the HTML and requests linked assets.

One IP Can Serve Many Domains

The HTTP Host header and the TLS Server Name Indication identify the requested hostname. A single server IP can therefore serve multiple sites.

The server still needs a virtual host configured for each hostname. Pointing DNS at an IP does not automatically configure the server.

Static and Dynamic Websites

Static website

Files such as HTML, CSS, JavaScript, and images are served as stored. Static sites have a small attack surface and are a good first deployment.

Dynamic website

Application code generates responses, often using a database, authentication, background jobs, and secrets. Dynamic sites require additional deployment, backup, and security practices.

This book builds a static site first. The DNS and HTTPS concepts also apply to dynamic applications.

HTTP Status Codes

CodeMeaning
200Request succeeded
301 or 308Permanent redirect
302 or 307Temporary redirect
404Path not found
500Application or server error
502Reverse proxy could not reach the application
503Service temporarily unavailable

Headers Worth Checking

curl -I https://www.example.dpdns.org

Look for the status code, content-type, redirects, caching headers, and security headers. Do not assume a browser error is a DNS error.

Layer-by-Layer Verification

Registration -> NS delegation -> DNS record -> Network port -> TLS -> HTTP -> Application

Test in that order. A later layer cannot repair an earlier one.

Continue to Build a Static Website.