A wildcard domain is a DNS record that uses an asterisk (*) as the leftmost label — for example *.mybusiness.com — and automatically resolves any subdomain that doesn't have its own explicit record. Instead of manually creating store.mybusiness.com, blog.mybusiness.com, and app.mybusiness.com individually, a single wildcard record handles them all.
This article explains exactly how wildcard records work, which use cases they're ideal for, their limitations, and how to pair them with a wildcard SSL certificate.
How a Wildcard DNS Record Works
The zone file syntax is straightforward:
*.mybusiness.com. IN A 203.0.113.10
This tells the DNS system: "any label to the left of .mybusiness.com that has no explicit record of its own should resolve to 203.0.113.10".
The * operator matches exactly one label level. That means:
store.mybusiness.com→ matched and resolved.dev.store.mybusiness.com→ not matched. The wildcard doesn't descend two levels unless you also define*.store.mybusiness.com.
Explicit records always take priority. If you define blog.mybusiness.com IN A 203.0.113.20, that value is used — the wildcard does not interfere.
Wildcards with Other Record Types
| Type | Example | Typical use |
|---|---|---|
A |
* IN A 203.0.113.10 |
Point all subdomains to one server IP. |
AAAA |
* IN AAAA 2001:db8::1 |
Same, but for IPv6. |
CNAME |
* IN CNAME mybusiness.com. |
Redirect all subdomains to the root domain. |
MX |
* IN MX 10 mail.mybusiness.com. |
Accept email on any subdomain (uncommon). |
When to Use a Wildcard Domain
SaaS Platforms and Multi-Tenant Apps
This is the most common use case. If you run a platform where each customer gets their own subdomain — client1.yourapp.com, client2.yourapp.com — you can't create DNS records manually every time someone registers. The wildcard solves this: point *.yourapp.com to your load balancer or app server, and your application identifies the tenant from the HTTP Host header.
WordPress Multisite (Subdomain Install)
WordPress Multisite in subdomain mode automatically creates a subdomain for each site in the network. For all of them to resolve correctly, you need a wildcard DNS record and a matching Apache or Nginx directive (ServerAlias *.yourdomain.com).
Dynamic Dev and Staging Environments
Development teams often create per-branch subdomains: feature-login.app.com, fix-checkout.app.com. With a wildcard, any new branch resolves automatically without touching DNS.
User Vanity Subdomains
Some services give users a personal page at username.platform.com. A wildcard covers every user profile with a single DNS record instead of thousands of individual entries.
Wildcard SSL Certificates
A wildcard DNS record needs a matching wildcard SSL certificate so that HTTPS works across all those subdomains. A wildcard cert has the Common Name or SAN set to *.mybusiness.com and covers any first-level subdomain.
Key points:
- Like the DNS record, a
*.mybusiness.comcertificate does not coverdev.store.mybusiness.com. You'd need*.store.mybusiness.comor a multi-SAN cert. - Let's Encrypt issues wildcard certificates for free, but they require DNS-01 challenge validation (not HTTP-01), which means DNS provider API access is needed for automation.
- Commercial CA wildcard certs (DigiCert, Sectigo) have an annual cost but simplify management in environments without automation tooling.
If your hosting is managed by an agency like El Enlace, wildcard certificate issuance and automated renewal are included in the managed hosting plan.
Limitations and Considerations
Wildcards are powerful but come with constraints worth knowing:
- One label deep only — As explained,
*.domain.comdoesn't reacha.b.domain.com. You need a second wildcard for nested subdomains. - Doesn't cover the apex —
*.mybusiness.comdoes not covermybusiness.comitself. The root domain needs its own A or AAAA record. - Broader attack surface — Every subdomain resolves automatically, even unintended ones. Make sure your web server returns 404 or redirects unrecognized subdomains so they don't become loose endpoints.
- DNSSEC interaction — NSEC/NSEC3 records interact with wildcards in nuanced ways; managed DNS providers handle this transparently, but manually configured zones should be validated.
For a deeper look at how subdomains and DNS fit into your overall domain strategy, visit our domains resource hub.
How to Set Up a Wildcard Record in cPanel
- Log in to cPanel and open Zone Editor (Advanced).
- In the Name field, enter
*(or*.yourdomain.com.with the trailing dot). - Select type
Aand enter your server's IP address. - Save. Changes propagate within minutes on the local server; global DNS propagation can take up to 48 hours.
- Add
ServerAlias *.yourdomain.comto your Apache VirtualHost so the web server also accepts requests for those subdomains.
Key Takeaways
- A wildcard record (
*.domain.com) automatically resolves any first-level subdomain without individual DNS entries. - It covers only one label level; nested subdomains require additional wildcard records.
- It's essential for SaaS multi-tenant platforms, WordPress Multisite, and dynamic dev environments.
- Pair it with a wildcard SSL certificate to enable HTTPS across all matching subdomains.
- Explicit records always take priority; the apex domain always needs its own record.
Need a wildcard domain and SSL set up without the technical headache? The team at El Enlace can configure and maintain it for you as part of a managed hosting plan.
FAQ
Are wildcard DNS and wildcard SSL the same thing?
No, but they work together. The wildcard DNS record controls name resolution — which IP a subdomain points to. The wildcard SSL certificate handles HTTPS encryption for those same subdomains. You need both for a new subdomain to work securely over HTTPS.
Does a wildcard cover the root domain (mybusiness.com with no subdomain)?
No. The asterisk in *.mybusiness.com requires at least one additional label. The apex (mybusiness.com) needs its own A or AAAA record. This is a common oversight that leaves the root domain unresolvable when only a wildcard exists.
Is it safe to use a wildcard record for many subdomains?
Yes, with care. The main risk is that unintended subdomains will also resolve to your server. Configure your web server to return 404 or redirect requests for unrecognized subdomains, and monitor your active subdomain list regularly.
Can I use a wildcard on a .mx domain?
Yes. Wildcards are a DNS protocol feature, not a TLD restriction. They work identically on .mx, .com, .net, or any other extension, provided your DNS provider supports them — and virtually all modern providers do.
Compare providers
Other providers and guides worth comparing: