4.3 Single-Label Expansion

PSPU §6.7 sets the search expansion rules. This article is how resolvd builds and asks the list of candidates.

4.3.1 What counts as a single label #

  • A name is single-label when it parses to exactly one label. The trailing dot plays no part: printer. is single-label and is expanded exactly as printer is.
  • A top-level domain such as com is a single label too, and cannot be asked for directly: it is asked only as its expansions.
  • Any other name — a multi-label name, or the root — has one candidate, itself.

4.3.2 The applicable domains #

An exclusive scope at addressed or better supplies only its own search domains, whether or not it has servers. Otherwise, all up scopes contribute their domains in metric order, followed by ExtraSearchDomains.

An up scope without servers still contributes domains. Equal metrics keep snapshot order, and each scope retains its domain order.

An exclusive scope excludes other scopes' domains and extra domains. With no domains, a single-label question has no candidates and is notfound without a network query. A candidate selecting a serverless scope is unavailable if upstream work is needed; it does not move to another scope.

4.3.3 Building the candidates #

Each domain in turn is appended to the label.

  • A candidate already in the list, compared case-insensitively, is not added again.
  • A candidate longer than 255 bytes on the wire is left out.

With no candidates left the name is notfound without a query (§4.1).

4.3.4 The case of a candidate #

A candidate keeps the case of the label as asked and of the domain as configured; that is the case its records are reported at (§4.8).

4.3.5 Asking the candidates #

  • Candidates are asked one at a time, in order. Each is routed on its own (§4.4) and shares the question's attempt budget (§4.6).
  • A notfound — from a server or from the cache — moves to the next candidate (§4.1).
  • found, with records or without, is the answer, and later candidates are not asked.
  • unavailable is the answer, and later candidates are not asked.
  • When the last candidate is notfound, the question is notfound (§4.1).

Edit this page