Intuition The one core idea
Humans name things with words (google.com), but computers find each other using numbers (IP addresses). DNS is the giant, shared, tree-shaped lookup service that turns a name into a number — and it does this by splitting the job across many servers so that no single machine ever has to know everything.
Before you can follow recursive vs iterative queries , record types , or the hierarchy , you must own every word and symbol the parent note quietly assumes. This page builds each one from nothing, in an order where each piece rests on the one before it.
Definition Hostname (a "name")
A hostname is the human-readable label for a machine on the internet, like www.example.com. It is just text — letters, digits, and dots. It exists only for human memory ; the network hardware does nothing with it directly.
Definition IP address (a "number")
An IP address is the numeric location a machine actually uses to send data. Think of it as the street address packets are delivered to. There are two flavours:
IPv4 — four numbers 0–255, e.g. 93.184.216.34.
IPv6 — a much longer 128-bit form, e.g. 2606:2800:220:1:248:1893:25c8:1946.
The picture: imagine a phonebook. The name is "Annie Sharma"; the number is "555-0142". You remember the name; the phone system dials the number.
Why the topic needs this: DNS's entire reason to exist is this name→number gap. If humans could remember 128-bit numbers, DNS would be pointless. (More on the two number formats in IP Addressing — IPv4 vs IPv6 .)
Definition Label and the separating dot
A hostname is chopped into labels by dots. In www.example.com, the labels are www, example, and com. The rightmost label is the most "senior" (broadest) part; the leftmost is the most specific machine.
Intuition Why right-to-left?
Reading right-to-left is like reading a postal address from country → city → street → house . com is the "country," example is the "city," www is the "house." This ordering is what makes a tree possible — each dot is a branch downward.
Definition FQDN (Fully Qualified Domain Name)
A name written all the way up to the invisible top is a Fully Qualified Domain Name , marked by a trailing dot: www.example.com.. That final dot is the root — the silent common ancestor of every name on earth.
Why the topic needs this: the whole hierarchy (root → TLD → domain → host) is literally reading a name right-to-left, one dot at a time .
Definition Tree (the shape of the whole system)
A tree is a picture where one top point (the root ) splits into branches, each branch splits again, and so on — never looping back. Each split point is a node .
Delegation means: "I don't store the answer myself; I store the address of who does." Each level of the tree keeps only a pointer to the next level down. The root keeps pointers to .com, .org, .in…; .com keeps pointers to example.com's owner; and so on.
Intuition Why a tree, why delegation?
One giant file listing every name→number pair would be impossible to update or share (this is exactly why the old HOSTS.TXT died). A tree lets each owner control only their own branch. No machine knows everything — each knows only who to ask next. That single sentence is the beating heart of DNS.
Definition Client and server
A client is the side that asks a question. A server is the side that answers (or points elsewhere). Your laptop is a client; the DNS machines are servers.
The stub resolver is the tiny, "dumb" DNS client built into your laptop or phone. It knows almost nothing: it just asks one question ("what's the IP for this name?") and waits for one answer.
Definition Recursive resolver
The recursive resolver is a powerful helper server (your ISP's, or 8.8.8.8) that does all the running around on your behalf and remembers past answers. "Recursive" here means "it takes full responsibility for chasing the answer."
The picture: the stub resolver is a student who asks the school office one question. The recursive resolver is the office clerk who makes all the phone calls and hands back the final number.
Why the topic needs this: the difference between recursive and iterative queries is entirely about who does the running around — the clerk (recursive resolver) or the person asking (stub). Get these two roles straight and that whole section becomes obvious.
A referral is a non-final reply that says "I don't have it, but go ask them instead" — it hands back the address of a server one step closer to the answer.
Definition Authoritative answer
An authoritative answer is the final, true reply, given by the server that actually owns and stores the record. Every other server along the way was only pointing.
Intuition Recursive vs iterative in one image
Recursive query: "Give me the finished answer; I'll wait." (stub → recursive resolver)
Iterative query: "Just give me your best referral; I'll keep hopping myself." (recursive resolver → root → TLD → authoritative)
The reason big servers (root, TLD) only answer iteratively is cost: they hand you a pointer and forget about you, instead of doing your legwork. If they did recursion for the whole planet, they'd melt.
Definition Resource Record (RR)
A record is one stored fact of the form (name, type, value, TTL). Example: (www.example.com, A, 93.184.216.34, 3600). The type says what kind of fact (an IPv4 address? a mail server? an alias?).
Definition TTL (Time To Live)
The TTL is a number of seconds saying how long a cached copy of a record stays fresh before it must be looked up again. A TTL of 3600 means "trust this for one hour."
A cache is a short-term memory of recent answers. After the resolver learns an IP once, it writes it on a mental sticky-note (valid for the TTL) so the next identical question is answered instantly, skipping the whole tree walk.
Definition Priority number
A priority number is a rank attached to some records (notably mail servers). The rule is counterintuitive: the lowest number is tried first . Read it as "distance" or "rank #1," not "importance." 10 mail1 beats 20 mail2.
Why the topic needs this: MX records carry these numbers, and the classic mistake is thinking a bigger number means a more important server. It's the opposite.
Root TLD Authoritative hierarchy
Client server resolver roles
Recursive vs Iterative query
Query referral authoritative answer
A AAAA CNAME MX NS records
Cover the right side and test yourself. If any line is shaky, re-read its section above.
A hostname is the human-readable name of a machine, like www.example.com — text only, for human memory.
An IP address is the numeric location packets are actually delivered to (IPv4 93.184.216.34, or the longer 128-bit IPv6).
We read a domain name right-to-left, most-senior (broadest) label first — like country → city → street.
An FQDN is a name written fully up to the root, marked by a trailing dot: www.example.com..
Delegation means each level stores only a pointer to the next level, never the whole answer.
A stub resolver is the dumb DNS client on your laptop that asks one question and waits.
A recursive resolver is the helper server that does all the running around and caches answers.
A recursive query asks for the final finished answer ("I'll wait").
An iterative query returns a referral — the address of the next server to ask.
An authoritative answer is the final true reply from the server that actually stores the record.
A record has the form (name, type, value, TTL).
TTL means how many seconds a cached record stays fresh before re-lookup.
A cache is short-term memory of recent answers, valid for the TTL, that skips the tree walk.
In MX priority, the preferred server has the lowest number (tried first).
Back to the main topic: parent note . Related foundations: IP Addressing — IPv4 vs IPv6 · Caching and TTL · HTTP and the Web request lifecycle .