Overview
When adding a subdomain in DNS management tools like WHM or external DNS panels, the subdomain may fail to resolve if the fully-qualified domain name (FQDN) is entered without a trailing period ("."). This occurs due to the way DNS zones are processed as relative by default.
Pre-requirements
- Access to your DNS Zone editor (e.g., WHM, cPanel, or external DNS panel)
- Basic knowledge of DNS records and subdomains
- Administrative rights to modify DNS settings
Understanding the Issue
DNS zones are relative, meaning if the "root" indicator (a trailing period) is not included when adding a subdomain, the DNS system may misinterpret the entry and append the domain name twice. For example:
sub.example_domain.com.domain.com
Instead of properly resolving the subdomain, it appends the domain name twice, causing a resolution failure.
Steps to Resolve the Subdomain Issue
Step 1: Open Your DNS Zone Editor
Access your DNS zone editor through WHM, cPanel, or an external DNS provider's management panel.
Step 2: Add the Subdomain
When adding a subdomain, ensure you enter either:
- Only the subdomain name (e.g.,
sub
) - The fully-qualified domain name with the trailing period (e.g.,
sub.example_domain.com.
)
Step 3: Verify the Record
Ensure that the DNS record for the subdomain is correctly added. You can verify using the dig
command:
dig sub.example_domain.com
If configured properly, you should receive a valid response with the correct IP address.
Common Mistakes to Avoid
- Do not enter the fully-qualified domain name (FQDN) without the trailing period ("."). If you use
sub.example_domain.com
without the period, it may append the domain again, resulting in a misconfiguration. - Avoid only entering part of the domain like
sub.example_domain
, as it can lead to incomplete DNS records.
Gotchas to Avoid
- If using a third-party DNS provider, ensure that you are aware of how their system handles relative DNS entries. Some providers automatically add the domain name if the FQDN is not provided with a trailing period.
- Make sure the DNS changes have propagated. DNS propagation may take up to 48 hours to fully complete.
Additional Troubleshooting Tips
- Use
nslookup
ordig
commands to verify DNS record propagation:
dig sub.example_domain.com
- Check for any conflicting DNS records or misconfigurations that might prevent the subdomain from resolving properly.