HomeBlogDomain › Subdomain Wildcard

What is Subdomain Wildcard? How It Differs from Regular Subdomains & Setup Guide

📅 September 21, 2026 ⏱️ 10 min read 🏷️ Domain, DNS, Wildcard
Subdomain Wildcard DNS record setup and usage guide

If you've ever seen *.example.com in DNS documentation or on an SSL Certificate and wondered what it means — this guide explains everything you need to know about Subdomain Wildcards, from basic concepts and DNS mechanics to real-world use cases and security best practices in 2026.

1. What Is a Subdomain? A Quick Refresher

A subdomain is the part that appears before the main domain name, separated by a dot. For example, if the main domain is example.com, subdomains include www.example.com, mail.example.com, and shop.example.com.

Each subdomain can point to a different IP address or server, making it easy to separate services under a single domain.

The Structure of a Domain Name

PartExampleDescription
Top-Level Domain (TLD).com / .net / .orgThe rightmost part of the domain
Second-Level Domain (SLD)exampleThe main registered domain name
Subdomainwww / mail / shopThe prefix before the main domain

Example: shop.example.com → subdomain = shop, SLD = example, TLD = .com

2. What Is a Subdomain Wildcard?

A Subdomain Wildcard is a special DNS record that uses the asterisk (*) symbol as the subdomain prefix. It matches any subdomain name that hasn't been explicitly defined elsewhere.

Written as: *.example.com

What the * (Wildcard) means:
When you have a DNS record *.example.com → 203.0.113.1, it means every subdomain not otherwise defined — such as anything.example.com, test.example.com, client99.example.com — will resolve to IP 203.0.113.1 automatically.

Important: Wildcard records do not override explicitly defined subdomains. If www.example.com → 203.0.113.2 exists as a separate A record, DNS will use that record instead of the wildcard.

3. Wildcard vs. Regular Subdomains — Comparison

FeatureRegular SubdomainWildcard Subdomain
DNS record creationOne record per subdomainSingle record covers all names
Dynamic subdomain supportNo — requires manual DNS updateYes — no DNS change needed
Management complexityLow (explicit)Requires app-level routing
Multi-tenant SaaSInconvenientIdeal
Security considerationsLowerRequires careful setup
Wildcard SSL compatibleNot neededPerfect pair

4. How Wildcard DNS Works

When a browser tries to resolve client5.example.com, the DNS lookup process works like this:

  1. Check for exact match: Is there a record for client5.example.com? → Use it if found.
  2. If no exact match → Check for wildcard: Is there a *.example.com record?
  3. If wildcard exists → Use the IP from the wildcard record.
  4. If neither exists → NXDOMAIN (domain not found).
Important: Wildcard records only match a single level of subdomain. *.example.com matches abc.example.com but does not match abc.def.example.com (a sub-subdomain). To cover deeper levels, you'd need a separate wildcard like *.def.example.com.

5. Setting Up Wildcard DNS in DirectAdmin

AsiaGB Hosting uses DirectAdmin as its control panel. Here's how to add a Wildcard DNS record:

Step-by-Step Setup

  1. Log in to your DirectAdmin control panel.
  2. Navigate to DNS Management.
  3. Select the domain you want to configure.
  4. Click Add Record.
  5. Fill in the fields:
    • Name: * (asterisk only)
    • Type: A (or CNAME if pointing to a hostname)
    • Value: Your server's IP address
    • TTL: 300 or 3600 as needed
  6. Click Save.
Example DNS zone file entry:
* IN A 203.0.113.1
Or as CNAME: * IN CNAME example.com.

Verify After Setup

After saving, wait 5–30 minutes for propagation (for domains using AsiaGB nameservers), then test:

nslookup random123.example.com
# Should resolve to the IP you configured

6. Wildcard SSL Certificates

A Wildcard SSL Certificate is issued specifically for *.example.com, securing every subdomain that the Wildcard DNS record covers — with a single certificate.

TypeCoversPrice (AsiaGB)
Single Domain SSLexample.com onlyFrom 1,000 THB/year
Wildcard SSL (DV)*.example.com — all subdomainsFrom 5,000 THB/year
Wildcard SSL (OV)*.example.com + organization validationFrom 15,000 THB/year

Combining Wildcard SSL with Wildcard DNS means every new subdomain you create automatically has HTTPS — no need to issue new certificates or modify SSL configuration for each one.

Note: Like Wildcard DNS, Wildcard SSL only covers one level. *.example.com covers shop.example.com but not test.shop.example.com.

7. Use Cases — When Should You Use Wildcard?

Multi-tenant SaaS Platform

Give each customer their own subdomain — company-a.yourapp.com, company-b.yourapp.com — without touching DNS every time a new customer signs up. The application handles routing based on the hostname.

Development & Staging Environments

Create dynamic environments per feature branch: feature-login.dev.example.com, feature-payment.dev.example.com, preview-pr-42.staging.example.com.

Microservices Architecture

Route traffic to different services dynamically: api-v1.example.com, api-v2.example.com, metrics.example.com.

White-label Services

Let partners access your platform through their own branded subdomain: partner1.service.com, partner2.service.com.

E-commerce Store Fronts

Allow merchants on a marketplace platform to have their own subdomain storefronts: merchant-abc.marketplace.com.

8. Security Risks & Best Practices

Common Risks

Best Practices

Best practice: If your application doesn't recognize the requested subdomain, return HTTP 404 or redirect to an error page rather than displaying a default page — this prevents information leakage.

Need a Domain with Wildcard SSL?

AsiaGB offers domain registration and Wildcard SSL certificates, with easy DNS management through DirectAdmin. Uptime 99% guaranteed.

View Domain Services →

9. Frequently Asked Questions

Q: What is a Subdomain Wildcard?
A Subdomain Wildcard is a DNS record using an asterisk (*) to match any subdomain not explicitly defined. For example, *.example.com resolves any.example.com, test.example.com, etc. — all to the same IP — without creating individual records for each.
Q: How does Wildcard DNS differ from regular subdomains?
Regular subdomains need a separate DNS record each (www, mail, shop). A Wildcard record uses a single * entry to cover any subdomain not explicitly defined, enabling dynamic subdomain support without DNS changes.
Q: Can I use Wildcard SSL with Wildcard DNS?
Yes. A Wildcard SSL Certificate (*.example.com) is designed to pair with Wildcard DNS — securing all covered subdomains with one certificate so you don't need individual SSL certs per subdomain.
Q: How do I set up Wildcard DNS in DirectAdmin?
In DirectAdmin, go to DNS Management, select your domain, add a new A record with Name set to * and Value set to your server's IP address. Save and allow 5–30 minutes for propagation.
Q: Does Wildcard DNS cover sub-subdomains?
No. *.example.com matches only one level — abc.example.com — but not abc.def.example.com. For sub-subdomains, create a separate wildcard record like *.def.example.com.

10. Summary

  • A Subdomain Wildcard (*.domain.com) is a DNS record that matches any undefined subdomain automatically.
  • Ideal for Multi-tenant SaaS, Development Environments, Microservices, and White-label Services.
  • Pair with a Wildcard SSL Certificate to enable HTTPS for all subdomains with one cert.
  • Easy to configure in DirectAdmin: add an A record named * pointing to your server IP.
  • Watch out for Cookie security and implement application-level hostname validation.
  • Wildcard covers only one subdomain level — not sub-subdomains.