NS1 supports wildcard records, such as *.example.com
or *.sub.example.com
. In the record, wildcards are indicated by a leading asterisk (*) domain name segment.
A wildcard record matches any queries at or below the level of the wildcard. For example, *.example.com
will match:
www.example.com
a.b.example.com
many.levels.of.subdomains.example.com
Note
You must place the wildcard asterisk at the beginning of the domain name (e.g.,
*.example.com
). The asterisk cannot be placed in the middle of the domain (e.g.,www.*.example.com
andex*mple.com
are not permitted).You can only apply one wildcard in the domain name. Multiple wildcards (e.g.,
*.*.example.com
) are not permitted.
If a specific label name is configured that would otherwise match a wildcard at the same level, it will supersede the wildcard record. For example, if you have one record for *.example.com
and a second record for www.example.com
, then a lookup for www.example.com
will match the specific record www.example.com
, whereas a lookup for abc.www.example.com
will return NXDOMAIN since the initial match is made for www.example.com
within which no *.www.example.com
exists.