How DNS Works: The Internet’s Phone Book Explained
Every time you visit a website, DNS is working behind the scenes. Here’s how it works — in plain English.
Howdy Friends! Every website you visit is served by a web server — software that listens for incoming requests and responds with the right content. Three names dominate this space: Apache, NGINX, and Caddy. They all do the same fundamental job, but they approach it very differently. Let’s dig in.
When a visitor types your URL and hits enter, their browser sends an HTTP request to your server. The web server receives that request, figures out what to return — a webpage, an image, a file — and sends it back. It also handles HTTPS encryption, redirects, virtual hosting (serving multiple domains from one server), and proxying requests to backend applications like PHP or Node.js.
That’s the job. How each server handles that job under the hood is where the differences get interesting.
Apache HTTP Server has been around since 1995 and was for a long time the most widely used web server on the internet. It’s mature, extensively documented, and supported by virtually every hosting control panel and Linux distribution out of the box.
Apache uses a process-based or thread-based model depending on which Multi-Processing Module (MPM) is configured.
Under load, even with Event MPM, Apache can struggle with very high concurrency because each active connection still ties up a thread.
Apache’s configuration system is powerful and flexible — sometimes to a fault. Configuration lives in httpd.conf and a hierarchy of included files. One of Apache’s most distinctive features is .htaccess — per-directory configuration files that can override server settings at the directory level without restarting the server.
.htaccess is powerful for shared hosting environments where individual users need control over their own directories. It comes at a performance cost, though — Apache has to check for .htaccess files on every request, all the way up the directory tree.
.htaccess support is requiredNGINX (pronounced “engine-x”) was released in 2004, designed from the ground up to solve a specific problem: handling tens of thousands of simultaneous connections without consuming enormous amounts of memory. It succeeded.
NGINX uses an event-driven, asynchronous, non-blocking architecture. This is fundamentally different from Apache’s thread-per-connection model.
NGINX runs a small, fixed number of worker processes — typically one per CPU core. Each worker runs an event loop that can handle thousands of connections simultaneously without spawning new threads or processes. When a connection is idle or waiting on I/O, the worker moves on to the next connection rather than sitting idle.
The result is dramatically lower memory usage and much better performance under high concurrency compared to Apache’s traditional models.
NGINX does not execute application code directly. For PHP, it passes requests to PHP-FPM (FastCGI Process Manager) via FastCGI. For Node.js, Python, or other app servers, it proxies requests upstream. This separation keeps NGINX lean — it handles what it’s good at (connection management, static files, TLS) and hands off the rest.
NGINX configuration is declarative and hierarchical. The main config file (nginx.conf) uses a block-based structure with http, server, and location blocks. It’s clean and readable once you understand the structure, but it can be unintuitive at first — especially directives that behave differently depending on where they appear in the hierarchy.
NGINX does not support .htaccess. All configuration must be in the server-level config files and requires a reload to take effect.
Caddy is the newest of the three, with its first stable release in 2015 and version 2 launching in 2020. It was built with modern web standards and developer experience as first-class priorities — and it shows.
Like NGINX, Caddy uses an event-driven, non-blocking model. It handles concurrency efficiently without the overhead of a thread-per-connection approach. Performance is comparable to NGINX for most workloads.
Where Caddy truly differentiates itself is in what it does automatically.
Caddy handles TLS entirely on its own. Point a domain at your server, add it to your Caddyfile, and Caddy automatically obtains a certificate from Let’s Encrypt (or ZeroSSL), configures HTTPS, and handles renewals — with zero manual intervention. No Certbot, no cron jobs, no cert expiry surprises.
Caddy also defaults to the most current TLS best practices out of the box: TLS 1.2 minimum, strong cipher suites, HSTS headers. You have to deliberately opt out of good security rather than opt in.
Caddy’s configuration file is called the Caddyfile. It’s remarkably readable compared to Apache or NGINX config.
A basic HTTPS reverse proxy in Caddy:
example.com {
reverse_proxy localhost:3000
}
That’s it. Caddy handles the certificate, the redirect from HTTP to HTTPS, and the proxy. The equivalent NGINX configuration with manual Certbot setup is significantly longer.
Caddy also supports a JSON-based API for dynamic configuration — you can update routes, add sites, and change settings at runtime without restarting the server. This makes it well-suited for environments that need to reconfigure on the fly.
Caddy is written in Go. It’s a single binary with no external dependencies. Memory usage is lean. Startup is fast. There are no modules to compile in or external libraries to manage.
| Apache | NGINX | Caddy | |
|---|---|---|---|
| First released | 1995 | 2004 | 2015 |
| Request model | Process/thread | Event-driven | Event-driven |
| Automatic HTTPS | No | No | Yes |
.htaccess support |
Yes | No | No |
| Config style | Directive-based | Block-based | Caddyfile / JSON |
| Memory efficiency | Moderate | High | High |
| Dynamic config (no restart) | Partial | No | Yes (API) |
| Best for | Legacy/shared hosting | High-traffic, proxying | Modern stacks, ease of use |
We evaluated all three and landed on Caddy for every GR Host server — and we haven’t looked back.
The automatic HTTPS is the obvious win. Every customer site gets a valid certificate from day one with zero configuration on their part. Renewals are handled automatically. Certificate expiry is simply not a thing our customers have to think about.
The Caddyfile is genuinely a pleasure to work with compared to the alternatives. Config is readable, concise, and easy to audit. When we need to add a new site, update a proxy rule, or change a redirect, it’s fast. Less config complexity means fewer mistakes and easier maintenance across our fleet of servers.
Caddy’s resource footprint is lean, which matters on VMs where every MB of RAM serves a customer’s workload rather than the web server itself. And the single-binary deployment fits cleanly into our containerized Podman-based stack.
Apache and NGINX are excellent servers with long track records. For certain use cases — legacy applications, shared hosting, high-traffic reverse proxies at scale — they’re the right tool. For the way GR Host builds and manages infrastructure, Caddy is the right tool for us.
Questions about your hosting setup or how we configure things under the hood? Get in touch — we’re always happy to talk shop.
Every time you visit a website, DNS is working behind the scenes. Here’s how it works — in plain English.
Every GR Host server runs Ubuntu LTS. Here’s why that decision matters for your site’s reliability and security.
A Linux kernel vulnerability called Dirty Frag was disclosed earlier this month. Here’s what we did about it and what it means for you.
Keep your files, photos, and documents private on your own server. Here’s what GR Host’s Nextcloud hosting offers and who it’s built for.
WordPress powers over 40% of the web. That makes it a massive target. Here are five security mistakes we see all the time — and how to avoid them.
Your domain is your address on the internet. Here’s where we recommend buying one.
At GR Host, every customer gets a dedicated VPS. No shared servers, no noisy neighbors. Here’s why that matters.
Lag ruins the Minecraft experience. Here are some simple things you can do to keep your server running smoothly.
Picking the right Minecraft server type makes a big difference. Here’s a simple breakdown of the most popular options.
GR Host’s 2026 Planned Holiday Business Hours
Excerpt
Three web servers dominate the hosting world. Here’s how Apache, NGINX, and Caddy work.
Plugins make WordPress powerful. They can also slow it down, break it, or get it hacked. Here’s how to use them the right way.
A CDN and proper caching strategy can dramatically improve performance, reduce server load, and protect your origin. Here’s why it matters and how we approac...
Not all WordPress hosting is created equal. Here’s what separates managed hosting from unmanaged and why it matters for your site.
Weak or reused passwords are one of the biggest risks to your WordPress site. Here’s how to do better without making your life harder.
Not every website needs WordPress. Here’s a simple breakdown to help you pick the right tool for the job.
GR Host’s 2025 Planned Holiday Business Hours
Learn how to setup DNS to enable email for your domain!
Virtual machines, containers, Kubernetes — the modern internet runs on these technologies. Here’s what they actually mean.
Every website asks about cookies. But what are they actually?
GR Hosts responding to the XZ vulnerability.
Version control is one of the most important tools in modern software development. Here’s why it matters, how Git works, and what CI/CD means for your workfl...
GR Host 2024 Holiday Business Hours
New Data Centers in Chicago and Washington DC
Computers, servers, drivers, firmware. Tese words get thrown around a lot. Here’s what they actually mean.