Web Development · Module 1 · Lesson 31 min read

Domains, DNS & Hosting

Domain names

A domain (example.com) is a human-friendly name for a server's IP address (93.184.216.34). You rent a domain yearly from a registrar (Namecheap, GoDaddy, Cloudflare).

DNS: the internet's phone book

When you visit a site, DNS turns the name into an IP: browser cache → operating system → resolver (your ISP or 1.1.1.1) → root server → .com server → the domain's authoritative server → IP address. Answers are cached for their TTL, which is why DNS changes can take a while to spread.

Common DNS records

RecordPoints toExample use
AIPv4 addressmain website
AAAAIPv6 addressmain website (IPv6)
CNAMEanother domainwww → example.com
MXmail serveremail
TXTtextdomain verification, SPF

Hosting options

TypeGood forExamples
Static hostingHTML/CSS/JS sites, React buildsGitHub Pages, Netlify, Vercel, Cloudflare Pages
Platform (PaaS)Node, Python and other backendsRender, Railway, Fly.io
Backend-as-a-servicedatabase, auth, storageSupabase, Firebase
VPS / cloud serversfull controlDigitalOcean, AWS, GCP

💡 Beginners: start with free static hosting plus Supabase for data.