Wildcard DNS is a DNS record configuration that uses an asterisk (*) in the hostname field to direct any subdomain to the same IP address or domain with a single record. Setting "*.example.com" routes abc.example.com, xyz.example.com, and anything.example.com to the same server.
The configuration is as simple as "*.example.com A 93.184.216.34." If an explicit record exists for a specific subdomain, it takes precedence; the wildcard acts as a fallback.
In URL shortening services, wildcard DNS enables per-user custom subdomains. Assigning "user1.short.example.com" and "user2.short.example.com" to individual users requires no per-subdomain DNS records when a wildcard is in place. The server inspects the Host header to identify the user.
SaaS platforms such as Shopify and WordPress.com rely on wildcard DNS to provision customer subdomains at scale.
A key caveat is that wildcard DNS accepts requests for any subdomain, including non-existent ones. The server must validate the requested hostname and return an appropriate error page for unknown subdomains. Combining wildcard DNS with a wildcard SSL certificate (*.example.com) enables HTTPS across all subdomains. You can find related books on Amazon.