DNS Zone Model¶
The DNS zone model is used to represent a distinct DNS zone. It contains the zone name, TTL, and SOA record details.
Domain registration attributes are modeled separately in DNSRegistration.
name(string): FQDN of the Zone, w/ TLD. e.gexample.com. Must be unique within its DNS view, ignoring letter case. See Zone Name Uniqueness.enabled(boolean, defaultTrue): Indicates whether the zone is eligible for publication by external integrations. This app does not publish zones or enforce this setting. The same field exists on every DNS record type; disabling a zone does not change the records it contains.ttl(integer): Time to live for the DNS zone.filename(string): Filename of the DNS zone file.description: (string): Description of the DNS zone.soa_mname: (string): FQDN of the authoritative name server for the DNS zone.soa_rname: (string): Mailbox or single-label placeholder for the person responsible for the DNS zone.soa_refresh: (integer): Time in seconds for secondary name servers to query the primary for the SOA record.soa_retry: (integer): Time in seconds for secondary name servers to retry to request the serial number from the primary.soa_expire: (integer): Time in seconds for secondary name servers to stop answering requests if the primary does not respond. This value must be bigger than the sum of refresh and retry.soa_serial: (integer): Serial number of the zone. This value must be incremented each time the zone is changed, and secondary DNS servers must be able to retrieve this value to check if the zone has been updated.soa_minimum: (integer): Minimum TTL for records in this zone.tenant(Tenant, optional): Reference to the Tenant model for multi-tenancy support.auto_create_ptr(boolean, defaultFalse): When enabled, creating an A or AAAA record in this zone automatically creates a matching PTR record in the most-specific reverse zone within the same DNS view. If no matching reverse zone exists, the A/AAAA creation fails with a validation error.
Zone Name Uniqueness¶
DNS names that differ only by letter case are the same name (RFC 1035 §2.3.3, RFC 4343 §2). A DNS view therefore cannot contain two zones whose names differ only by case, such as Example.com and example.com. The same name may exist in different DNS views.
The name is stored with the letter case as entered. Creating or renaming a zone so that it collides with another zone in the same view is rejected with a validation error on name in the UI and the REST API, and by the database for any other write path. A zone may change the letter case of its own name.
SOA RNAME Formats¶
An SOA RNAME may be entered as an email address, a basic DNS-style mailbox, or a single-label placeholder. Email-style values must be valid email addresses. Basic DNS-style mailboxes are normalized to email form prior to being saved, and single-label placeholders are stored without a trailing dot.
DNS-style mailbox decoding follows RFC 1035 §3.3.13 and §8. This app stores decoded mailbox values in email form as follows:
| Input | Stored value | Result |
|---|---|---|
admin@example.com |
admin@example.com |
Accepted unchanged |
admin.example.com. |
admin@example.com |
Normalized from DNS style |
john\.smith.example.com. |
john.smith@example.com |
The \. escape becomes a dot in the mailbox name per RFC 1035 §5.1 |
invalid. |
invalid |
Single-label placeholder normalized |
john@example |
— | Rejected because the email domain is not fully qualified |
admin\046example.com. |
— | Rejected because the DNS escape is unsupported |
admin..example.com |
— | Rejected because the DNS-style mailbox is malformed |
Added in version 1.2.0 — DNS label length rules
When DNS validation is enabled (via the DNS_VALIDATION_LEVEL configuration), DNSZone enforces the following DNS label length rules, as specified by RFC 1035 §3.1:
- Each label (the parts of the name separated by dots) must be no more than 63 bytes in wire format
- Empty labels (e.g., consecutive dots or leading/trailing dots) are not allowed
See the installation guide for configuration options.