DNS names, hierarchy and record types
Build the vocabulary needed to read a DNS answer without confusing names, zones, servers and records.
- Distinguish a DNS name, zone, server and typed record.
- Recognise the DNS hierarchy and the purpose of common record types.
- Network foundations
- IP addressing
- Client and server
On this page
Start with the names, not the tool
DNS is a distributed database whose data is indexed by domain names. A name is a sequence of labels in a hierarchy. In www.example.test., the final dot represents the root, test is below the root, example is below test, and www is below example.
- 01Root (.)
- 02Top-level domain (.test)
- 03Authoritative zone (example.test)
- 04Typed records (A, AAAA, MX…)
Four roles that beginners often merge
| Role | What it does | What it does not prove |
|---|---|---|
| Stub resolver | Accepts an application's request and passes it to a recursive resolver | That the returned destination is safe |
| Recursive resolver | Finds an answer, follows referrals and caches eligible data | That it owns the authoritative zone |
| Root/TLD server | Refers the resolver toward the next part of the hierarchy | Normally, the final host address |
| Authoritative server | Answers from authoritative data for a zone | That every client has an uncached copy |
Records are typed data
The query name and requested type both matter. Asking for A and asking for MX are different questions.
| Type | Carries | Beginner check |
|---|---|---|
| A | IPv4 address | Is this the address of the queried name? |
| AAAA | IPv6 address | Do not call it “four A records”; AAAA is one type. |
| CNAME | Alias to a canonical name | The next name still needs its own relevant records. |
| MX | Mail exchanger plus preference | It does not directly mean “the website server”. |
| TXT | One or more character strings | The application defines their meaning. |
| NS | Authoritative name server for a zone | It names the server; its address is separate data. |
| PTR | Another domain name, commonly used in reverse DNS | Reverse mapping is not automatic proof of identity. |
| SOA | Administrative zone data, serial and timing values | It describes the zone, not a user mailbox. |
Cache and TTL
Eligible DNS data can be cached. The TTL is a time interval supplied with a record; it limits how long that cached record may be reused before it must be refreshed. TTL is not a guarantee that every cache began at the same moment.
Comprobación rápida
A resolver returns an A record for example.test. What exactly has been established?
See how a recursive resolver uses cache, referrals and authoritative data.