Lesson 5 of 14 · 15m
DNS Records That Don't Lie to You
A/AAAA/CNAME semantics, TTL as the whole of 'propagation', CAA gating cert issuance, and the dangling-record takeover.
nginx never sees a packet until DNS has already decided where packets go. Most "my site is down" reports are DNS problems, and most DNS problems come from record semantics you didn't know existed — not from anything being broken on the server.
The records that matter
A— name → IPv4.AAAA— name → IPv6. You want both if the box has v6; a missing AAAA silently drops IPv6-only users.CNAME— name → another name. The constraint nobody tells you: a CNAME cannot coexist with any other record at the same name (RFC 1034/2181), and the apex of a zone always holds SOA and NS records — soexample.com → CNAMEis illegal. That's why providers offerALIAS/ANAME/CNAME flatteningat the apex: a fake record type that resolves like an A.TXT— verification and policy: SPF, DKIM keys, DMARC, ACME DNS-01 challenges.CAA— the record most operators haven't heard of: it controls which certificate authorities may issue for the domain (RFC 8659).CAA 0 issue "letsencrypt.org"means only Let's Encrypt can mint certs for you. It costs nothing and turns a whole class of misissuance into an instant failure.
"Propagation" is a myth made of caches
There is no propagation delay — there are resolver caches honoring the TTL you set. Change an A record with TTL 3600 and some users see the old address for an hour because their resolver cached it. The operational consequence: lower the TTL to ~300 seconds a day before a planned move, let old lookups age out, then cut over and raise it back. Operators who don't do this discover their migration is an hour-long split-brain where half the world still lands on the old box.
The registrar doesn't run your DNS
Your registrar delegates to nameservers — the NS records are the actual handoff. Whoever's nameservers you point at serves records; the registrar's dashboard is just the delegation editor. Pointing NS to Cloudflare means Cloudflare serves DNS even though Namecheap (or whoever) still holds the registration. This distinction matters when you debug: the question is never "what does my registrar show," it's dig +trace example.com — what the delegation chain actually resolves to.
Cloudflare proxied vs. DNS-only
The orange cloud terminates traffic at Cloudflare's edge: TLS ends there, your origin sees Cloudflare IPs, and the real visitor arrives via CF-Connecting-IP — which nginx needs the realip module plus Cloudflare's published IP ranges to trust and restore. Two consequences people miss: CF only proxies HTTP/S on its supported ports (80, 443, 8080, 8443, 2052–2053, 2082–2083, 2086–2087, 2095–2096, 8880) — an SSH or game-server hostname must be DNS-only; and the proxy hides your origin IP only if it isn't already leaked — direct-connect subdomains, mail records, and historical DNS databases all reveal it. An attacker who knows the origin IP skips the proxy entirely unless the origin firewall refuses non-CF traffic.
The dangling record that takes over your subdomain
Delete a SaaS service but leave status.example.com → CNAME deadsaas.com: anyone who registers the dead name now serves content on your subdomain — a textbook subdomain takeover. Prune records when services die; audit the zone yearly.
Field notes
dig @1.1.1.1vsdig @8.8.8.8shows you different cached answers — that's TTL behavior, not inconsistency.- Keep a text export of your zone in the repo next to your infra configs. DNS state deserves version control too.
dig +short example.comanddig +short example.com @ns-of-authoritative— comparing cache against authority is the whole debugging loop.- MX and PTR get their lesson in outbound email — but know now that DNS is one zone of cooperating record types, not a flat list.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Self-Hosting Vaultwarden Without Trusting the Defaults
Vaultwarden gives you a Bitwarden-compatible password server in one container and about ten minutes. The defaults that make that possible leave org creation open, audit logging off, accounts on PBKDF2, and a rate limiter that trusts a header anyone can set.
What You Can Self-Host on Oracle Cloud Free Tier (2026)
What actually fits on Oracle Cloud free tier after the June 2026 cut: Ghost, Vaultwarden, Syncthing, monitoring, and a small AI model, sized in real RAM.
The Complete Self-Hosted AI Stack for 2026
Building a local AI server is more than installing Ollama. This guide builds a full production AI stack with Open WebUI, LiteLLM, Qdrant, Traefik, and Langfuse — what each component does, why it's needed, and three complete Docker Compose configurations for beginners, power users, and small teams.
Self-Host OpenClaw: VPS Setup to Production (2026)
Self-host OpenClaw from zero to production. Server provisioning, SSH lockdown, Docker, reverse proxy, Fail2ban, performance tuning, and full backup strategy in one guide.