Wildcard Service Names¶
A service may be registered under a wildcard name (Solo #599) so that one service answers for every name beneath it:
preview-17.apps.example.com, pr-482.apps.example.com and anything else
under apps.example.com are then steered by that single service — no service
row per hostname, which is what platform teams building per-branch or
per-tenant hostnames actually need.
Matching follows RFC 4592. There is nothing to enable; a service whose domain
starts with *. is a wildcard, and everything else behaves exactly as before.
Which service answers¶
Given a query name, the most specific match wins:
- An exact service at that name.
- The closest wildcard —
*.eu.apps.example.combeats*.apps.example.comforweb.eu.apps.example.com. - Otherwise NXDOMAIN, as before.
A wildcard matches names below its owner only, and it matches at any depth:
| Query | *.apps.example.com matches? |
|---|---|
one.apps.example.com |
yes |
a.b.apps.example.com |
yes — a wildcard is not limited to one label |
apps.example.com |
no — the owner itself is not covered by its own wildcard |
apps.example.org |
no |
To serve the owner name too, create a second, exact service for
apps.example.com. That is a deliberate DNS rule, not a limitation of this
implementation: *.apps.example.com describes the names under
apps.example.com.
Writing a wildcard name¶
* is only meaningful as the leftmost label. a.*.example.com and
*abc.example.com are rejected with a 400 rather than stored — DNS would treat
them as literal labels that never match anything, so a service created that way
would silently answer nothing.
The wildcard name still has to sit inside a verified delegated domain when any are configured.
What the answer looks like¶
The response is owned by the queried name, not by the wildcard:
;; QUESTION
;preview-17.apps.example.com. IN A
;; ANSWER
preview-17.apps.example.com. 60 IN A 192.0.2.10
That is also how it is cached — per queried name, so two different hostnames under the same wildcard never share a cache entry, and the per-service TTL, filter chain, pool and shadowing settings all apply as usual.
DNSSEC signing covers the expanded name as served, the standard approach for an online signer. Nexus does not emit the RFC 5155 §8.8 wildcard-expansion proof, so a validator sees an ordinary signed answer rather than one it can identify as wildcard-expanded.
Interaction with other features¶
- Static records (StaticRecords.md) are matched by exact owner name only — wildcards apply to services, not to static records.
- An exact static record beats a wildcard service, because a wildcard only applies where the queried name has no data of its own. An exact service still beats a static record at the same name, as it always has.
- Zone transfers render a wildcard service under its literal
*.owner name, which is valid in a zone file and is what a secondary expects. - Query insights treat a wildcard service as one service: per-service QPS and anomaly baselines aggregate every hostname it answers for.