en

Recursive DNS is a query mode in which the resolver fully resolves a name itself and returns a ready answer to the client, hiding all the intermediate requests to DNS servers.

How a recursive query works

In a recursive query the client asks once, and the resolver steps down the name hierarchy one level at a time:

  • Root — the resolver asks a root server, which points to the servers of the relevant top-level domain zone.
  • TLD zone — the top-level domain server, for example .com, returns the addresses of the servers for the specific domain.
  • Authoritative server — the zone's authoritative server returns the final record, and the resolver hands it to the client.

The resolver stores the answer for the TTL period, so the next identical query is served instantly.

Recursive vs iterative query

A recursive query is contrasted with an iterative one. In an iterative query the server does not look up the answer itself but only returns a referral to the next server, and the client walks the hierarchy on its own.

In practice the client sends the resolver a recursive query, while the resolver talks to the root and authoritative servers iteratively. This split offloads work from the client and lets answers be cached centrally.

Recursive DNS — walking the name hierarchy
Learn more

Tag cloud