1. Home
  2. Learn
  3. DNS, and how to read your DNS table

Domains, hosting & DNS

DNS, and how to read your DNS table

Every row in that intimidating table does one job. Here's what each record type means and which ones break things.

In short

DNS is the system that turns a domain name people can remember into the numeric address a computer can connect to. Your DNS table — sometimes called the zone file — is your domain's page in that system, and each row is a single instruction: this name points at that thing. Once you know the half-dozen record types, the table stops being intimidating.

What DNS actually does

Computers don't connect to names. They connect to numbers — 192.0.2.14, or a much longer IPv6 equivalent. Humans are bad at remembering numbers and good at remembering names, so DNS exists to translate between the two.

When you type a domain into a browser, roughly this happens:

  1. Your browser checks whether it already knows the answer. If it does, it stops here.
  2. Otherwise it asks a resolver — usually your ISP's, or a public one like 1.1.1.1 or 8.8.8.8.
  3. The resolver asks a root server who handles .com.
  4. It asks that server which nameservers are authoritative for your domain.
  5. It asks those nameservers for the record it needs, and gets an answer.
  6. It caches the answer so the whole chain doesn't have to run again.

All of that normally happens in tens of milliseconds. The part you control is step five: the table of records sitting on your authoritative nameservers.

The DNS table, row by row

Your DNS table — often called the zone file — is a list of records. Every record has a type (what kind of answer it gives), a name (which part of your domain it applies to), a value (the answer) and a TTL (how long the answer may be cached).

These are the types you'll actually meet:

TypeWhat it doesTypical value
APoints a name at an IPv4 address. The main "where does my website live" record.192.0.2.14
AAAASame job, IPv6. Harmless and increasingly worth having.2606:4700::1
CNAMEPoints a name at another name, an alias. Can't coexist with other records on the same name.yoursite.netlify.app
MXWhere email for this domain should be delivered. Has a priority number — lower wins.10 mx.google.com
TXTFree-text notes. In practice: SPF, DKIM, DMARC and domain-ownership verification.v=spf1 include:_spf.google.com ~all
NSWhich nameservers have authority over this zone. Set at the registrar.ns1.example-dns.com
SRVPoints at a service on a specific port. Mostly VoIP and chat systems.10 5 5060 sip.example.com
CAARestricts which certificate authorities may issue certificates for the domain.0 issue "letsencrypt.org"

Reading the "name" column

The name says which part of your domain the record covers. @ means the bare domain itself. www means www.yourdomain.com. * is a wildcard catching anything not matched by a more specific record.

A typical minimum for a website with Google Workspace email looks like: an A record on @ pointing at the host, a CNAME on www pointing at @, a handful of MX records for mail, and a TXT record holding your SPF policy.

TTL, and why changes aren't instant

TTL — time to live — is a number in seconds attached to every record. It tells resolvers how long they're allowed to reuse a cached answer before asking again. 3600 means an hour. 86400 means a day.

This is the entire explanation for "the new site is live for me but my client still sees the old one". Nothing is broken. Their resolver simply has an answer it's still entitled to use. The much-mythologised "DNS propagation" isn't a wave rolling across the internet — it's just caches expiring at different times.

The trick worth knowing

Planning a migration? Drop the TTL to 300 (five minutes) a day or two before you make the change. Every resolver picks up the short TTL first, so when you flip the record everyone follows within minutes instead of hours. Put the TTL back up afterwards. This one habit turns most cutovers from a nervous day into a nervous coffee.

Nameservers: who's in charge of your table

Before any record matters, something has to be trusted to answer for your domain at all. That is what nameservers are, and they're set at the registrar, not in the DNS table itself.

This is the source of an enormous amount of wasted time. People edit DNS records in their hosting control panel, see no effect, and conclude DNS is broken. Almost always, the domain's nameservers point somewhere else entirely — Cloudflare, or the old host — so the table they are editing is real but nobody is reading it.

Before editing any DNS record, check the NS records first. Edit the table that's actually authoritative. If you're unsure which that is, look up the domain and see what the nameservers say.

The records that decide whether your email arrives

Three TXT-based records determine whether your mail lands in the inbox or the spam folder. They're worth understanding because when email "stops working", this is usually why.

SPF

A list of servers permitted to send mail claiming to be from your domain. One TXT record on the bare domain, starting v=spf1. You may only have one SPF record. Two is a misconfiguration and receiving servers will treat it as a failure — a common outcome when a business adds a new mail service without merging it into the existing record.

DKIM

A cryptographic signature on outgoing mail, letting the receiver verify the message really came from you and wasn't altered. Your mail provider gives you the record to publish.

DMARC

A policy saying what a receiver should do when SPF and DKIM fail — ignore, quarantine, or reject — and where to send reports. Start with p=none and read the reports for a few weeks before tightening it. Going straight to p=reject is how you discover, loudly, which of your systems were sending mail on your behalf.

To find out whether yours are working, send yourself a test email and read Gmail's verdict, which takes about two minutes.

What to check when a site isn't working

Work down this list in order. It resolves most cases before the end.

  1. Is the domain still registered? An expired domain looks exactly like a broken one. Check the expiry date first — it's free and takes ten seconds.
  2. What do the NS records say? Confirm which DNS table is actually live before you trust anything you see in a control panel.
  3. Does the A record point at the right address? Compare it with the IP your host lists for the account.
  4. Does www resolve as well as the bare domain? Plenty of "the site is down" reports are just one of the two missing.
  5. Is it DNS at all? If the domain resolves to the correct IP and the page still fails, DNS has done its job — the problem is at the host.
  6. Are you looking at a cache? Try a different network, or a public resolver, before concluding anything.

That sequence — registration, then authority, then records, then the host — follows the order the request itself travels, which is why it finds the fault faster than guessing.

If step one or two is where you got stuck, the companion piece is worth reading first: web host vs. domain registrar covers who actually holds which piece, which is usually the confusion underneath a DNS problem. If you are setting all of this up for the first time, start here instead.

Rather someone just handled it?

Knowing how this works and wanting to spend your week on it are different things. Tell me what you're dealing with and you'll get a straight answer — within one business day.