Advanced DNS Zone File Management in DirectAdmin
For advanced users, DirectAdmin provides access to the raw DNS zone file, allowing complete control over your domain's DNS configuration. This is useful when you need to add record types not available through the standard interface or make bulk changes.
Accessing the Zone Editor
- Log in to DirectAdmin and navigate to Account Manager → DNS Management.
- Select your domain from the dropdown.
- DirectAdmin displays the current DNS records in a table format. For standard edits, use this interface.
- If your DirectAdmin version supports it, look for a Raw Zone or Zone Editor link for direct zone file editing.
Understanding the Zone File Format
A DNS zone file follows a standard format. Here is an example of key components:
$TTL 3600
@ IN SOA ns1.example.com. admin.example.com. (
2024010101 ; Serial
3600 ; Refresh
1800 ; Retry
604800 ; Expire
86400 ) ; Minimum TTL
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
@ IN A 192.0.2.1
www IN A 192.0.2.1
mail IN A 192.0.2.1
@ IN MX 10 mail.example.com.
@ IN TXT "v=spf1 a mx ~all"
Important Zone File Rules
- Serial number: Must be incremented every time you make changes. DirectAdmin typically handles this automatically. The convention is
YYYYMMDDNNwhereNNis an incremental revision number. - Trailing dots: Fully qualified domain names in zone files must end with a dot (e.g.,
mail.example.com.). Omitting the trailing dot causes the zone origin to be appended, leading to errors likemail.example.com.example.com. - SOA record: Do not modify the SOA record unless you know exactly what you are doing. Incorrect SOA values can break DNS resolution for your entire domain.
- TTL values: Lower TTL values (e.g., 300 seconds) cause DNS resolvers to refresh more frequently, which is useful before making changes. Increase TTL after changes have propagated.
Adding Less Common Record Types
The raw zone editor lets you add record types that may not appear in the standard interface:
- CAA Record:
@ IN CAA 0 issue "letsencrypt.org"– restricts which CAs can issue certificates. - SRV Record:
_sip._tcp IN SRV 10 60 5060 sip.example.com.– defines service locations. - TLSA/DANE Record: Used for DNS-based authentication of TLS certificates.
Propagation After Changes
After saving zone file changes, allow time for DNS propagation. Changes typically take effect within minutes to hours, but full global propagation can take up to 48 hours depending on TTL values and caching by ISP resolvers. Use tools like DNS Checker to monitor propagation in real time.