← All posts
Web Design Oct 2, 2026 · 4 min read

DNS Fundamentals Every Web Developer Should Know

DNS is the part of a launch nobody thinks about until it breaks. Here are the records, TTLs and tools every web developer should understand before touching a zone file.

Brett Warnebold, Senior Web Developer & Software Engineer

Brett Warnebold

Senior Web Developer & Software Engineer

Glowing fibre optic cables carrying network traffic

Most web developers can build a beautiful site and never once think about how a browser actually finds it. Then launch day arrives, the domain points nowhere, email stops working, and suddenly everyone is staring at a DNS panel they have never opened.

Owning DNS for a company’s sites taught me that it isn’t complicated. It’s just unforgiving. A handful of concepts cover almost everything you’ll run into, and knowing them turns a scary launch step into a five-minute task.

What DNS actually does

DNS turns a name like example.com into the IP address of a server. When someone visits your site, their device asks a recursive resolver (usually run by their ISP, or a public one like 1.1.1.1 or 8.8.8.8). If the resolver doesn’t already have the answer cached, it walks the chain: the root servers point it to the .com servers, which point it to your domain’s authoritative nameservers, which finally hand back the record.

One distinction trips people up constantly: your registrar (where you bought the domain) and your DNS host (where the records live) don’t have to be the same company. The registrar only stores which nameservers are in charge. If the domain’s nameservers point to Cloudflare, editing records at the registrar does nothing at all.

The records you’ll use most

  • A maps a name to an IPv4 address. This is what points your domain at your web server.
  • AAAA does the same for IPv6. If your host gives you an IPv6 address, add it.
  • CNAME makes one name an alias of another, like pointing www at your host’s hostname.
  • MX tells the world which servers accept email for your domain. Break these and nobody gets mail.
  • TXT holds text, mostly used for verification and email authentication (SPF, DKIM, DMARC).
  • NS lists the authoritative nameservers for a zone.
  • CAA says which certificate authorities are allowed to issue SSL certificates for your domain.

The apex CNAME problem

Here’s a rule that surprises a lot of developers: you can’t put a CNAME on the root of your domain (the bare example.com, also called the apex). The DNS standard doesn’t allow a CNAME to sit alongside other records, and the apex always has NS and SOA records, plus usually MX and TXT.

That’s a problem when a platform tells you to point your domain at a hostname instead of an IP. The fix depends on your DNS host: many offer an ALIAS or ANAME record, and Cloudflare does CNAME flattening. All of them resolve the hostname behind the scenes and answer with plain A records, so you get the flexibility of a CNAME without breaking the rules. Otherwise, use the A record your host provides and CNAME www to it.

TTL and the propagation myth

You’ll hear that DNS changes take 24 to 48 hours to propagate. That’s not really how it works. Nothing gets pushed around the internet. Resolvers simply cache answers for as long as the record’s TTL (time to live, in seconds) tells them to.

If your A record has a TTL of 86400, a resolver that looked it up an hour ago can keep serving the old IP for another 23 hours. If the TTL is 300, the worst case is five minutes. That’s why the most useful DNS habit you can build is lowering the TTL a day or two before any planned change. Changing nameservers is the one case that really is slow, because the TLD’s own records are cached for up to two days.

DNS doesn’t propagate. Caches expire. Plan around the TTL and launches get boring, in the best way.

Check it yourself with dig

Online lookup tools are fine, but dig (built into macOS and most Linux systems) tells you exactly what’s happening. These are the commands I reach for most:

# What does the domain point to?
dig example.com A +short

# Where does www alias to?
dig www.example.com CNAME +short

# Who handles email?
dig example.com MX +short

# Verification and email records
dig example.com TXT +short

# Ask a specific public resolver (skips your local cache)
dig @1.1.1.1 example.com A

# Follow the whole chain from the root servers down
dig +trace example.com

The full dig output also shows the remaining TTL on each answer, which tells you how long a resolver will keep serving what it has.

Why this matters for web developers

DNS sits underneath everything we build: SSL certificates, CDNs, email from contact forms, third-party verification for analytics and search tools. A developer who can read a zone file and explain a TTL is the person a team trusts on launch day. In the next two posts I’ll cover how to migrate a site without downtime and how to set up the email records that keep your contact form messages out of spam.

Web Design
Brett Warnebold, Senior Web Developer & Software Engineer

Written by

Brett Warnebold

Senior Web Developer & Software Engineer in Washington, DC, building fast, vibrant sites with React and WordPress since 2018.

Connect on LinkedIn →

Let's build something

Hiring? Let's talk

I'm open to Senior Web Developer and Software Engineer roles. Message me on LinkedIn to set up an interview or see my full experience and recommendations.