Configure wildcard DNS
What is wildcard DNS?
Wildcard DNS is a record that catches all subdomains that don't have a specific record. It's represented with an asterisk (*) and allows any subdomain to automatically point to an IP or domain without needing to create individual records for each one.
When to use wildcard DNS?
Wildcard DNS is useful when:
- ✅ You have many dynamic subdomains (e.g., each user has their subdomain)
- ✅ You want any subdomain to work automatically
- ✅ You need flexibility to create subdomains without configuring DNS each time
Configure wildcard with A record
Step 1: Access DNS panel
- Log in to the panel where you manage your DNS
- Look for the DNS or DNS Zone section
Step 2: Add wildcard A record
- Click Add Record or Add
- Select type A
- Fill in the fields:
- Name/Host:
*(asterisk) - Value/IP: Your server's IP (e.g.,
23.175.40.20) - TTL: 3600 seconds
- Name/Host:
- Save the changes
![]() |
| Image 1: Wildcard A record configuration example. |
Result:
After configuring this, any subdomain without a specific record will point to that IP:
anything.yourdomain.com→23.175.40.20test.yourdomain.com→23.175.40.20user123.yourdomain.com→23.175.40.20
Configure wildcard with CNAME record
You can also use wildcard with CNAME to point all subdomains to another domain:
- Type: CNAME
- Name:
* - Value:
yourdomain.com(or destination domain)
Note: Some DNS systems don't allow CNAME wildcard at the root domain. Check your provider's limitations.
Configure wildcard in cPanel
Step 1: Access Zone Editor
- In cPanel, look for Zone Editor
- Select your domain
Step 2: Add wildcard record
- Click + A Record
- Name:
* - Address: Your server's IP
- Click Add Record
Record priority
Specific records have priority over wildcard:
- If you have an A record for
www.yourdomain.comand a wildcard*.yourdomain.com - The specific
wwwrecord will be used first - The wildcard only applies to subdomains without specific records
Example:
- A Record:
www→192.168.1.1 - Wildcard A:
*→23.175.40.20 - Result:
www.yourdomain.com→192.168.1.1(uses specific record)blog.yourdomain.com→23.175.40.20(uses wildcard)
Verify that wildcard works
Option 1: Use ping
ping test123.yourdomain.com
You should see the IP configured in the wildcard.
Option 2: Use nslookup
nslookup anysubdomain.yourdomain.com
Option 3: From browser
- Wait for DNS propagation to complete
- Enter any subdomain in the browser
- It should resolve to the configured IP
Common use cases
1. Multi-tenant hosting:
When each client has their own subdomain:
client1.yourdomain.comclient2.yourdomain.comclient3.yourdomain.com
All automatically point to the same server without creating individual records.
2. Development and testing:
To quickly create test subdomains:
dev.yourdomain.comstaging.yourdomain.comtest.yourdomain.com
3. SaaS applications:
When each user has their own instance on a subdomain.
Common issues
Wildcard doesn't work
- Verify that the record is saved correctly
- Wait for DNS propagation to complete
- Verify there are no syntax errors
- Some DNS providers don't support wildcards
Conflict with specific records
- Remember that specific records have priority
- If a subdomain doesn't work, verify if it has a specific record
- Delete or modify the specific record if you want it to use the wildcard
Wildcard interferes with other services
- If you have services that need specific subdomains, create specific records for them
- The wildcard only affects subdomains without specific records
Limitations and considerations
- ⚠️ Not all DNS providers support wildcards
- ⚠️ Some services (like SSL certificates) may have issues with wildcards
- ⚠️ The wildcard can make unwanted subdomains work
- ✅ Specific records always have priority
- ✅ You can combine wildcard with specific records
Tips
- ✅ Use wildcard when you need many dynamic subdomains
- ✅ Create specific records for important subdomains (www, mail, etc.)
- ✅ Verify that your DNS provider supports wildcards
- ✅ Consider security implications (any subdomain will work)
- ✅ Document which subdomains use wildcard and which have specific records
Need help?
If you have questions about how to configure wildcard DNS or if it's the best option for your case, open a ticket from the billing.baires.host panel or contact us for support.
You can also reach us through our social media:
- Instagram: @baires_host
- Discord (active support): https://discord.gg/dzjauatAFN
- Linktree: https://linktr.ee/baires.host
