404human Experience Projects Writing Build logs Learning Books Progress
Rust · Zola
zsh · 404human@dev:~ Tab complete · ↑↓ history · type help

How websites actually work: domains, DNS, hosting, and HTTPS

Domains, DNS records, web hosting, and HTTPS explained with one simple house analogy—plus how to tell what broke when a site goes down.

Published
Read time
5 min read
Kind
guide
Topics

The first time someone tries to put a small business site or personal blog online, they hit a wall of four-letter words within ten minutes: registrar, nameservers, A record, CNAME, MX, TTL, SSL certificate. Half the time they end up paying twice for things they did not need—or staring at “This site can’t be reached” with no idea which company to contact.

You do not need a computer science degree to understand how a website loads. The whole chain is just four pieces—and they map cleanly to visiting a friend’s house.

The house analogy

PieceReal-world analogyWhat it actually doesCommon providers
Domain nameThe street address (yourshop.com)The human-friendly name you rent each yearCloudflare Registrar, Porkbun, Namecheap
DNSThe public phone bookTranslates yourshop.com into a computer’s numeric IP addressCloudflare DNS, your registrar
Web hostingThe actual houseThe always-on computer storing your HTML, images, and appCloudflare Pages, Netlify, Vercel, a VPS
HTTPS / TLSA sealed, tamper-proof envelopeEncrypts data between the visitor’s browser and your hostBuilt-in free via Let’s Encrypt or your host

Here is what happens in under a second when you type https://404human.dev into your browser:

1. You type 404human.dev
         │
         ▼
2. Browser asks DNS: "What IP address lives at 404human.dev?"
         │  (DNS answers: e.g. 104.21.x.x)
         ▼
3. Browser connects to that server and verifies its HTTPS certificate
         │  (locks the encrypted tunnel)
         ▼
4. Server sends back HTML, CSS, and images ──► Browser draws the page

Every website outage or setup headache lives in one of those four steps.

You do NOT have to buy everything from the same company

One of the biggest money traps for beginners is assuming that wherever you buy your domain name must also host your website and email.

They are completely separate layers:

  • You can rent your domain from Company A (for ~$10/year).
  • Point its DNS to free static hosting at Company B (like Cloudflare Pages or Vercel for $0/month).
  • Point its email to Company C (like Google Workspace, Fastmail, or Zoho).

Keeping your domain registrar separate from your website builder also protects you: if you ever switch website builders later, you just update one DNS record instead of begging someone to release your domain name.

The only 4 DNS records normal people ever touch

When you open a DNS dashboard, you see a scary table of cryptic letters. Almost everyone only ever needs four of them:

Record typeWhat it points toEveryday example
A (or AAAA for IPv6)A numeric server IP addressPoint example.com to 203.0.113.10
CNAMEAnother domain name (an alias)Point www.example.com to example.pages.dev
MXYour email provider’s mail serversDeliver [email protected] to Google or Fastmail
TXTShort plain-text verification notesProve you own the domain, or set email anti-spam rules (SPF, DKIM, DMARC)

Two small gotchas save hours of confusion:

  1. @ means the bare root domain (example.com with no www.).
  2. TTL (Time To Live) is how many seconds internet providers are allowed to remember an old answer before checking again. That is why changing a record can look instant on your phone and take 15 minutes on your laptop—it is not broken, your laptop’s router is just holding onto the cached phone-book entry until the timer runs out.

What HTTPS actually protects (and what it does not)

Years ago, getting an SSL/TLS certificate (the thing that turns http:// into https://) cost money and required clunky manual renewals. Today, modern hosts and reverse proxies issue and renew free certificates automatically—you should almost never pay extra for a basic SSL certificate on a normal website.

HTTPS gives your visitors two guarantees:

  1. Encryption: Someone sitting on the same airport Wi-Fi cannot read the form or password you submit.
  2. Identity: You are genuinely talking to the server authorized for yourbank.com, not an imposter intercepting traffic in the middle.

What HTTPS does not guarantee is that the site owner is honest. A phishing site at yourbank-login-verify.com can easily get a free HTTPS certificate too. The padlock checks the tunnel, not the person at the other end.

When your website stops loading: a 60-second diagnosis

Next time a website breaks, read the browser’s error message like a map—it usually tells you which of the four layers failed:

  • DNS_PROBE_FINISHED_NXDOMAIN (“server IP address could not be found”): The phone book has no answer. Either the domain expired, nameservers are misconfigured, or you deleted the A/CNAME record.
  • NET::ERR_CERT_DATE_INVALID (“Your connection is not private”): The HTTPS certificate expired or does not cover the www. / non-www. version of the name.
  • 502 Bad Gateway or 503 Service Unavailable: DNS and HTTPS worked fine! The browser reached the front door, and the hosting server or app behind it crashed or timed out.
  • 404 Not Found: Everything is alive and working—that specific page URL simply does not exist on the server.

Knowing which layer broke turns a panicked two-hour support chat into a two-minute fix.

Frequently asked questions

If I buy a domain name, does that include a website? No. Buying a domain only rents the street address (like yourshop.com). You still need web hosting—the computer that actually stores and serves your website files—and DNS records pointing the address to that host.

Why do DNS changes take time to show up? Internet providers and routers cache DNS lookups so they do not have to ask the phone book on every single click. Each DNS record carries a TTL (Time To Live), often 5 minutes to 24 hours; visitors see the new server once their cached copy expires.

Does the HTTPS padlock mean a website is completely trustworthy? No. HTTPS only guarantees that the connection between your browser and that specific domain is encrypted so nobody on the Wi-Fi network can read or tamper with it. A scam website can still have a valid HTTPS padlock—always check the actual domain name.

Related reading