Skip to main content
短.be

Wildcard DNS

A DNS configuration that uses an asterisk (*) to point all subdomains to a single IP address with one record, enabling efficient management of large numbers of subdomains.

Dec 4, 2025 · About 1 min read

Redirect

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.

Share on XHatena

Was this article helpful?

Related Terms

Related Articles

FAQ

When is wildcard DNS used?
It is common in SaaS platforms that assign subdomains per customer, multi-tenant applications, and URL shortening services with custom domain features. It eliminates the need to create individual DNS records for each subdomain.
What are the security risks of wildcard DNS?
Because any subdomain resolves to your server, requests for non-existent subdomains also arrive. The server must validate hostnames and return a 404 for unrecognized subdomains.
Do I need a wildcard SSL certificate?
If you use wildcard DNS and want HTTPS on every subdomain, a wildcard SSL certificate (*.example.com) is required. You can obtain one for free from Let's Encrypt.

Ready to create a short URL?

Shorten a URL for Free