DNS basics: how records work
How a lookup actually resolves, the record types you will meet day to day, and how to tell a zone problem from a caching one.
Run the check
Almost every outage that looks like "the website is down" or "mail stopped arriving" turns out to be a DNS problem, and the reason is structural: DNS sits in front of everything else. A browser cannot open a connection, and a mail server cannot find where to deliver, until a name has been turned into an address. Get the records wrong and every service that depends on that name fails at once.
What happens when a name is resolved
A lookup is not one question to one server. It is a short chain, and knowing the shape of it tells you where to look when an answer is wrong.
- The stub resolver on your machine asks the resolver it was handed by DHCP or configured with — your router, your ISP, or a public one such as 1.1.1.1.
- The recursive resolver does the actual work. If it already holds the answer in cache, it returns that and the chain stops here. This is the single most common reason two people get different answers at the same moment.
- A root server is asked where to find the top-level domain, and replies with the nameservers
for
.com,.orgor whichever it is. - The TLD servers reply with the nameservers for your domain — the ones listed at your registrar.
- The authoritative nameservers hold the zone itself and return the record. This is the only answer that is definitively current; everything upstream of it may be cached.
The resolver then caches what it learned for the record's TTL and hands it back. That caching is the point of the system — without it the root servers would collapse under the load — and it is also why a change you just made is not visible everywhere. See what TTL really means for the detail.
The records you will actually meet
A and AAAA
The address records. A holds an IPv4 address, AAAA an IPv6 one. A name can have several of
each, and resolvers hand them out in rotation, which is the crudest form of load balancing there is.
CNAME
An alias: this name is really that name, go and look it up instead. Two rules catch people out. A name with a CNAME cannot have any other record, which is why you cannot put a CNAME at the apex of a domain that also needs MX records. And every CNAME costs an extra lookup, which matters when you are counting SPF lookups.
MX
Where mail for this domain should be delivered. Each record carries a preference number, and lower wins — a
10 is tried before a 20. Equal numbers are balanced between. The value must be a hostname,
never an IP address, and that hostname needs its own A or AAAA record. Check them with the
MX record checker.
TXT
Free text, which in practice means a grab bag of things that needed somewhere to live: SPF policies, DKIM public keys, DMARC policies, and domain ownership verification strings from every service you have ever signed up to. A domain usually has several, and they are distinguished by what their content starts with.
NS
The nameservers authoritative for the zone. These exist in two places — at your registrar, where the TLD learns them, and inside the zone itself — and when the two disagree you get intermittent failures that are maddening to diagnose, because only some resolvers will have followed the stale path.
SOA
One per zone, holding the primary nameserver, an administrative contact address, a serial number that secondaries use to spot a change, and the timers that govern transfers. You rarely edit it, but a serial that never increments means secondary servers never pick up your changes.
PTR
The reverse of an A record: this address claims to be this name. It lives in a zone controlled by whoever owns the IP block, not by you, which is the detail that surprises everybody the first time. It matters most for mail — see reverse DNS and PTR records.
CAA
Names which certificate authorities are permitted to issue certificates for this domain. A CA is required to check it. If you have one and it does not list the CA you are trying to use, issuance fails — a common and well-disguised cause of a certificate renewal that suddenly stops working.
SRV
Service location: the host and port for a named service, used by SIP, XMPP, Microsoft 365 autodiscover and others.
The name itself carries the service and protocol, as in _sip._tcp.example.com.
Zones, delegation and who is in charge
A zone is the part of the tree one set of nameservers is responsible for. Your registrar tells the TLD which
nameservers hold your zone; that pointer is the delegation. Everything below it is yours until you delegate a part
of it onwards — handing status.example.com to a status page provider, for instance, by publishing NS
records for that subdomain.
Two mistakes account for most delegation problems. The first is changing nameservers at the registrar before the new ones are serving the zone, which breaks the domain for as long as it takes to notice. The second is leaving a delegation in place for a subdomain whose provider you have stopped using, which leaves a name pointing at infrastructure someone else now controls.
TTL: the number that decides how long you wait
Every record carries a time to live, in seconds. A resolver that caches an answer will keep serving it, without asking again, until that many seconds have passed. A TTL of 3600 means an hour of people potentially seeing the old answer after you change it.
The practical move is to lower the TTL to 300 a day or two before a planned change, make the change, then raise it again once things have settled. Lowering it at the same time as the change does nothing, because resolvers are still holding the old record with the old, longer TTL.
Working out where a problem is
Start with what is actually published. Query the record you think you changed with the DNS lookup tool. If what comes back is not what you expect, the problem is in the zone, not in propagation, and no amount of waiting will fix it.
If the record is right, check who is still serving the old one. The propagation checker queries resolvers in different parts of the world and shows which have picked up the change. A mix of old and new is normal mid-change; all old after the TTL has comfortably passed is not.
Check the delegation when nothing resolves at all. Look up the NS records for the domain. If they do not match the nameservers your DNS provider expects, the zone you are editing is not the zone the internet is reading.
Remember the local layer. Your operating system and your browser both cache independently of your resolver, and a VPN or corporate network may route DNS somewhere else entirely. A result from a tool that queries from outside your network, like the ones here, sidesteps all of that.
Where to go next
If the problem is mail rather than web, the records involved are mostly TXT and MX, and SPF, DKIM and DMARC covers how they fit together. If a change looks published but is not visible yet, propagation and TTL explains what is actually happening and how long it should take.
More in the guides index.