A subdomain is a domain that sits beneath a registered parent domain in the hierarchical DNS namespace. It is created by adding one or more labels before the registered domain name — for example, www.example.com, api.example.com, and mail.example.com are all subdomains of example.com.
How It Works
Subdomains are created by adding DNS resource records in your parent zone's configuration. You can manage subdomains in two ways:
- In-zone subdomain — Add an A record, AAAA record, or CNAME record directly in your parent zone's DNS file. The same authoritative nameservers handle resolution.
- Delegated subdomain — Add NS records in the parent zone pointing to different authoritative nameservers for that subdomain, creating a separate zone of authority.
DNS resolvers follow the hierarchy: they query root → TLD → registered domain → subdomain nameservers to find the record.
Limits and Naming
Each label (subdomain component) can be up to 63 characters; the full domain name cannot exceed 253 characters. Subdomains support internationalized domain names via punycode encoding (e.g., xn--...).
Common Use Cases
www.for the main websitemail.orsmtp.for email servers (MX records)api.for application endpointscdn.for content delivery
WarningA wildcard certificate (
*.example.com) covers subdomains one label deep only — it matcheswww.example.combut nota.b.example.comor the bare apex domainexample.com. You need additional certificates or SAN entries for multi-level coverage.