DNSUnit 1 of 4
Foundations28 minIn reviewreview

DNS names, hierarchy and record types

Build the vocabulary needed to read a DNS answer without confusing names, zones, servers and records.

What you will learn
  • Distinguish a DNS name, zone, server and typed record.
  • Recognise the DNS hierarchy and the purpose of common record types.
Know this first
  • Network foundations
  • IP addressing
  • Client and server
Start this unit
Last verifiedReview every 365 days
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.

DNS namespace and delegationRFC 1034 / RFC 1035
  1. 01Root (.)
  2. 02Top-level domain (.test)
  3. 03Authoritative zone (example.test)
  4. 04Typed records (A, AAAA, MX…)

Four roles that beginners often merge

RoleWhat it doesWhat it does not prove
Stub resolverAccepts an application's request and passes it to a recursive resolverThat the returned destination is safe
Recursive resolverFinds an answer, follows referrals and caches eligible dataThat it owns the authoritative zone
Root/TLD serverRefers the resolver toward the next part of the hierarchyNormally, the final host address
Authoritative serverAnswers from authoritative data for a zoneThat 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.

TypeCarriesBeginner check
AIPv4 addressIs this the address of the queried name?
AAAAIPv6 addressDo not call it “four A records”; AAAA is one type.
CNAMEAlias to a canonical nameThe next name still needs its own relevant records.
MXMail exchanger plus preferenceIt does not directly mean “the website server”.
TXTOne or more character stringsThe application defines their meaning.
NSAuthoritative name server for a zoneIt names the server; its address is separate data.
PTRAnother domain name, commonly used in reverse DNSReverse mapping is not automatic proof of identity.
SOAAdministrative zone data, serial and timing valuesIt 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?

Elige una respuesta
Next stepFollow one resolution

See how a recursive resolver uses cache, referrals and authoritative data.