The most-used line in the zone file

Every DNS zone has one. The asterisk sits at the top of the file, catches every hostname nobody bothered to type, answers mail for domains that were never written down, and is the first trick a new zone owner learns and the last thing anyone reads a specification for.

That is the trouble with a feature everyone uses: nobody defines it until somebody needs to prove something about it. In July 2006, Ed Lewis of NeuStar published RFC 4592, “The Role of Wildcards in the Domain Name System”, and settled the argument with a sentence that reorganises the reader’s head. A wildcard is not a pattern. It is an ordinary DNS record with a strange owner name. DNSSEC is the reason the paperwork finally got done.

RFC 1034 defined wildcards in passing

The original definition lived in section 4.3.3 of RFC 1034, published in November 1987 — a few paragraphs inside a document about the whole naming system, written for implementers who would read it once. It left the interesting questions open. Does an asterisk match one label or any number of labels? Does it reach beneath a delegation? What happens when a name exists with a different type than the one being asked for?

Implementations answered those questions themselves, and answered them differently. RFC 4592 records the result with admirable bluntness: “many DNS implementations diverge, in different ways, from the original definition.”

A wildcard is a record, not a pattern

The memo’s first real move is a sentence that dissolves the mental model most engineers carry: “The syntax of a wildcard is the same as any other DNS resource record, across all classes and types. The only significant feature is the owner name.”

Read it twice. A wildcard is not a rule that matches query names. It is a resource record whose owner name happens to be *.example.com, sitting in the zone beside the A records and the MX records, and travelling in zone transfers like everything else — a detail the memo flags as under-appreciated. The asterisk is a label, not a metacharacter. Nothing is being pattern-matched. Something is being named.

The example that kills the intuitive reading

Section 2.2.1 lays out a small zone to end the argument. *.example. carries a TXT record and an MX record. Then comes the punchline: sub.*.example. carries a TXT record, annotated in the memo as “this is not a wildcard.”

One line, more work than a page of prose. An asterisk is special only when it fills the entire leftmost label. Put anything in front of it and you have an ordinary domain name that somebody happened to spell with a star — legal, unremarkable, and completely inert.

Closest encloser, source of synthesis, and the vocabulary that made answers provable

To say precisely when a server may invent an answer, RFC 4592 coins two terms. The “closest encloser” is “the node in the zone’s tree of existing domain names that has the most labels matching the query name.” The “source of synthesis” is the wildcard from which the answer is drawn.

Those phrases are not decoration. They mark the border between a server answering from a wildcard and a server inventing a name the zone never authorised. Delegate subdel.example, keep a wildcard at *.example, then ask for anything.subdel.example. Intuition says the asterisk should catch it. The algorithm says the delegation is closer, and the delegation wins.

Why DNSSEC forced the issue

The motive was not tidiness. DNSSEC signs answers, and a wildcard answer is an answer the server manufactures on the spot. To prove that a manufactured answer is legitimate — and to prove that a name genuinely does not exist — the signing machinery has to know exactly when manufacturing is permitted, and exactly what would have been signed if it were not.

The timing tells the story. DNSSEC’s core specifications, RFC 4033, 4034 and RFC 4035, shipped in March 2005. The memo that made their wildcard proofs coherent arrived sixteen months later. Hence the sentence that explains the whole exercise: “with an unclear definition of wildcards, the design of authenticated denial became entangled.” Cryptography could not be built on folklore, so the folklore had to be written down.

What RFC 4592 says about maintaining a protocol

The memo adds no feature. No new record type, no new wire format, no new option. It adds definitions, examples and a vocabulary, and it confines itself to what “implementation experience” forced.

That is the quiet lesson, and it outlives the asterisk. The specification did not lead the implementations; it followed them, then made their behaviour provable. Running code came first, the document came second, and the order matters — a protocol is not what its authors intended, it is what its implementations do and what its proofs can defend.

The asterisk that became knowable

The wildcard we use today is the wildcard this memo describes. It did not get more powerful. It did not get more convenient. It got knowable, which is what a protocol needs before anyone can prove anything about it.

Nearly two decades of ambiguity, one memo, and a punctuation mark that finally means something. Not bad for a character most engineers type without thinking — and a reminder that in the DNS, the things we use most are the things we define last.