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:
- Resolves the hostname through DNS.
- Connects to the returned IP address.
- Negotiates TLS for HTTPS.
- Sends an HTTP request containing the hostname and path.
- Receives an HTTP response.
- 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
| Code | Meaning |
|---|---|
200 | Request succeeded |
301 or 308 | Permanent redirect |
302 or 307 | Temporary redirect |
404 | Path not found |
500 | Application or server error |
502 | Reverse proxy could not reach the application |
503 | Service 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.