Fact-checked by Grok 2 weeks ago

SOA record

The Start of Authority (SOA) record is a fundamental resource record type in the (DNS) that marks the beginning of a of authority, providing essential administrative and operational information about the DNS it governs. Defined in the original DNS specifications, the SOA record specifies the primary responsible for the , the contact for the (encoded as a domain name without the "@" symbol), a indicating the zone's version, and several timing parameters that control how secondary name servers synchronize and maintain the data. It is mandatory for every DNS to begin with exactly one SOA record, ensuring consistent authority delegation and data freshness across the distributed DNS infrastructure. The structure of an SOA record consists of seven fixed fields, each serving a precise role in zone management: These fields enable efficient zone transfers (AXFR or IXFR) over , where the SOA record is transmitted first to verify compatibility and numbers. In practice, the SOA record plays a critical role in DNS operations beyond mere identification: it facilitates fault-tolerant replication by dictating refresh cycles (typically 24 hours or 86400 seconds), retry intervals (often 1-2 hours), and expiration thresholds (commonly 1-2 weeks) to prevent outdated or stale data from propagating errors. When a 's changes—due to additions, deletions, or modifications of other records—secondary servers detect this during their refresh polls and initiate transfers to stay synchronized. Additionally, the MINIMUM field helps optimize caching by setting a TTL, reducing unnecessary queries while adhering to IETF standards for DNS reliability and scalability. Introduced in 1987 as part of the core DNS protocol, the SOA record remains indispensable for authoritative DNS servers worldwide, underpinning the stability of resolution.

Introduction

Definition and Purpose

The Start of Authority (SOA) record is a type of (DNS) resource record with type code 6 that must exist exactly once per , marking the beginning of the zone's authoritative data and defining the scope of administrative control for that domain. As the foundational record in a , it declares the zone's within the DNS , serving as the of the zone's and informing resolvers and secondary servers about the boundaries of authoritative for the domain. The primary purpose of the SOA record is to specify the primary responsible for the , provide contact information for the administrator, and include parameters that enable secondary servers to perform zone transfers and manage caching effectively. This configuration ensures coordinated maintenance across distributed DNS infrastructure, allowing secondary servers to synchronize data from the primary source while adhering to defined refresh and expiration guidelines. In DNS operations, the SOA record supports zone transfers by providing parameters for synchronization between primary and secondary servers, and its MINIMUM field sets the default TTL for negative caching responses, including NXDOMAIN, as clarified in RFC 2308. It declares the zone's authority but does not enforce update authorization. Unlike NS records, which simply identify the name servers hosting the zone, the SOA record supplies the essential administrative details needed for operational integrity.

Historical Development

The Start of Authority (SOA) record was introduced in 1987 as a fundamental component of the (DNS) specification outlined in 1035, authored by . This record type emerged as part of the effort to establish a hierarchical, distributed naming for the , supplanting earlier centralized approaches like the hosts.txt file maintained by the Stanford Research Institute for the . The SOA record was designed to hold administrative and authoritative information for a , marking the beginning of standardized mechanisms for managing domain data across a growing network. In its early conception, the SOA record addressed the need for decentralized administration during the ARPANET's evolution into a more robust infrastructure. By enabling zone administrators to specify contact details, version tracking, and timing parameters, it facilitated the transition from monolithic host tables to a federated where multiple entities could independently manage portions of the . This was crucial in the late , as the network expanded beyond academic and military use, requiring reliable methods for propagating updates without central bottlenecks. Subsequent refinements clarified and extended the SOA record's functionality through targeted RFC updates. RFC 1982, published in 1996, provided precise rules for arithmetic to prevent issues in zone transfer comparisons, ensuring consistent versioning across resolvers. In 1998, RFC 2308 redefined the MINIMUM field to serve as the (TTL) for negative caching, improving efficiency in handling non-existent domain queries. In 2019, RFC 8499 incorporated the SOA record into an updated DNS glossary. In November 2024, RFC 9499 further updated the DNS , affirming its enduring role in documentation. The SOA record gained widespread adoption in the late 1980s through its integration into the Berkeley Name Domain () software, the first widely deployed DNS implementation, which became the for servers. This timeline was driven by the 's rapid growth, necessitating dependable zone transfer protocols to maintain data consistency amid increasing domain registrations and inter-domain communications.

Record Structure

Field Components

The SOA record consists of seven fields defined in the Resource Record Data (RDATA) portion, which collectively provide administrative and operational parameters for a DNS zone. These fields are represented in the DNS master file format, where domain names are subject to standard compression techniques to optimize storage and transmission, and all time intervals are expressed in seconds as 32-bit unsigned integers unless otherwise specified. The fields must be present in every SOA record, with MNAME and RNAME as required domain names, and the remaining five as numeric values essential for zone synchronization and caching. The first field, MNAME, specifies the hostname of the primary responsible for the , serving as the authoritative source for zone data updates and transfers. It is encoded as a standard and must resolve to a valid name server address within the DNS . The second field, RNAME, identifies the of the zone administrator in a domain name format, where the "@" symbol is replaced by a dot (e.g., "hostmaster.example.com" corresponds to [email protected]). This field functions as the contact point for administrative issues related to the , also encoded as a compressed . The third field, SERIAL, is a 32-bit unsigned representing the version number of the , incremented by the primary whenever changes occur to detect during transfers. It supports arithmetic to handle wrap-around from its maximum value of 4294967295, ensuring reliable change tracking without gaps. The fourth field, REFRESH, defines the suggested time interval at which secondary name servers should check the primary for updates, typically ranging from 1200 seconds (20 minutes) to 43200 seconds (12 hours) depending on update frequency. This 32-bit unsigned promotes efficient while minimizing unnecessary queries. The fifth field, RETRY, specifies the time interval a secondary should wait before retrying a failed refresh attempt, often set as a of REFRESH, such as 1200 to 7200 seconds (20 minutes to 2 hours). As a 32-bit unsigned , it ensures against temporary connectivity issues without overwhelming the primary . The sixth field, EXPIRE, indicates the maximum duration a secondary can continue serving as authoritative after failing to contact the primary, commonly configured between 1209600 and 2419200 seconds (14 to 28 days) to balance availability and data staleness. This 32-bit unsigned value must exceed the REFRESH interval to prevent premature invalidation during outages. The seventh field, MINIMUM, establishes the default time-to-live (TTL) value applied to all resource records from the zone in query responses, as well as the TTL for negative caching of non-existent data, typically set between 86400 and 432000 seconds (1 to 5 days) for stable zones. Represented as a 32-bit unsigned integer in seconds, it acts as a floor for TTLs, overriding lower values in individual records to enforce consistent caching behavior.

Data Encoding and Constraints

The SOA record is encoded as a variable-length resource record with type 6 in DNS messages, typically within the (IN) class, consisting of two domain names followed by five 32-bit unsigned fields. The domain names for the primary (MNAME) and responsible person (RNAME) are represented in the standard DNS wire format, utilizing -based encoding where each is preceded by a 1-octet (0-63), followed by the label characters, and terminated by a zero- label; these names support pointer-based compression to reduce message size when the same name appears multiple elsewhere in the message. The fields— (SERIAL), refresh interval (REFRESH), retry interval (RETRY), expire limit (EXPIRE), and minimum (MINIMUM)—are each encoded as 32-bit unsigned integers in network byte order (big-endian), representing time intervals in seconds, with no additional padding or null terminators between fields. The total RDATA varies depending on the encoded size of the domain names, which can range from 3 octets (for a single- name) up to 255 octets per name, resulting in a minimum SOA RDATA size of 26 octets and no fixed maximum beyond the overall DNS message limit of 65535 octets. For the RNAME field, the email address of the responsible person is transformed into a domain name format by replacing the "@" symbol with a dot; for example, "[email protected]" becomes the domain name "hostmaster.example.com", encoded as per the standard domain name rules without any special delimiters. This encoding ensures compatibility with the DNS protocol's domain name handling, treating the mailbox as a hierarchical name under the root. Serial number arithmetic operates modulo $2^{32}, treating the SERIAL as an unsigned 32-bit where increments wrap around from 4294967295 to 0, and comparisons use rules to determine if one value is greater, less than, or equal to another, avoiding ambiguities in the circular space by limiting increments to at most $2^{31} - 1 within the expire interval. The time interval fields (REFRESH, RETRY, EXPIRE, MINIMUM) must be positive unsigned 32-bit values, with REFRESH recommended between 1200 and 43200 seconds, EXPIRE at least as large as REFRESH plus several retry attempts (typically 1209600 to 2419200 seconds), and MINIMUM between 86400 and 432000 seconds to balance caching efficiency; values outside these ranges may lead to operational issues like excessive polling or premature data expiration, though the protocol permits any value from 1 to $2^{32} - 1. Resolvers encountering fields, such as non-positive times or malformed domain names, typically discard the entire SOA record or response to prevent propagation of s, as specified in the DNS protocol's error handling. In zone files, the SOA record follows the master file syntax defined for and compatible implementations, presented as a single line or multi-line entry using parentheses to group the fields for readability: example.com. IN SOA ns1.example.com. hostmaster.example.com. ( SERIAL REFRESH RETRY EXPIRE MINIMUM ). The RNAME may be enclosed in double quotes if it contains spaces or special characters, though this is rare given the constraints, and all times are specified in seconds without units. This presentation format facilitates human editing while mapping directly to the binary wire encoding upon loading into a nameserver.

Usage and Examples

Sample SOA Record

A typical SOA record appears at the beginning of a DNS zone file for a domain, defining the authoritative parameters for that zone. The following example illustrates an SOA record for the hypothetical domain example.com, using standard conventions for field values as specified in the original DNS protocol documentation.
example.com.    IN    SOA    ns1.example.com.    hostmaster.example.com.    (
                2025111001    ; Serial (YYYYMMDDNN format: November 10, 2025, revision 01)
                3600          ; Refresh (1 hour)
                1800          ; Retry (30 minutes)
                604800        ; Expire (1 week)
                86400         ; Minimum TTL (1 day)
                )
In this sample, the serial number employs the common YYYYMMDDNN format, where 2025111001 represents the date November 10, 2025, followed by a two-digit revision counter starting at 00; this approach facilitates incremental updates while maintaining a 32-bit unsigned integer limit. The refresh interval of 3600 seconds indicates how often secondary servers should check for updates, the retry value of 1800 seconds sets the wait time after a failed refresh attempt, the expire duration of 604800 seconds (one week) defines when secondaries discard the zone if unreachable, and the minimum TTL of 86400 seconds (one day) serves as the default caching time for negative responses unless overridden by individual resource records. This SOA record is positioned as the first entry in the zone file for example.com, with the domain origin implied by the @ symbol in many configurations, and it inherits or sets a default TTL for the zone unless a separate $TTL directive is used at the file's start. Variations in serial number formatting exist, such as using a simple incrementing integer or alternative date orders like DDMMYYYYNN in some legacy systems, though the YYYYMMDDNN convention remains widely recommended for clarity and automation compatibility.

Interpretation of Fields

In the sample SOA record for the example.com zone, the MNAME field specifies ns1.example.com as the primary , which serves as the target for secondary servers initiating zone transfers such as AXFR or IXFR requests. This designation ensures that updates are pulled from a designated authoritative source, facilitating consistent propagation of zone data across the DNS infrastructure. The RNAME field identifies the responsible party's email address, typically formatted as a domain name (e.g., hostmaster.example.com, equivalent to [email protected]), providing a direct contact point for troubleshooting zone-related issues or reporting errors. The SERIAL field, set to 2025111001, represents an unsigned 32-bit integer version number for the zone, where the value follows a common YYYYMMDDnn format to indicate the last modification date (November 10, 2025) and a two-digit revision sequence (01). This numbering scheme allows secondary servers to detect changes by comparing serial values during refresh checks, triggering transfers only when the primary's serial is higher. Operationally, the REFRESH interval of 3600 seconds (1 hour) dictates how frequently secondary servers should poll the primary for updates, promoting timely while avoiding excessive network load in stable environments. If a refresh fails, the RETRY value of 1800 seconds (30 minutes) enables rapid recovery attempts, minimizing from transient issues. The EXPIRE setting of 604800 seconds (7 days) establishes the maximum period a secondary can serve potentially stale data before considering the zone and ceasing responses, thereby preventing widespread dissemination of outdated information during prolonged primary outages. However, such a relatively short EXPIRE duration increases the risk of secondary servers expiring the zone prematurely, potentially causing resolver outages if the primary remains unreachable beyond this window. Best practices recommend balancing these timing intervals to optimize reliability against administrative overhead; for instance, shorter REFRESH and values enhance responsiveness in high-change zones but may strain server resources, while longer EXPIRE settings (e.g., 10-30 days) better tolerate outages without risking data invalidation. The MINIMUM field at 86400 seconds (1 day) primarily governs the for negative caching responses (such as NXDOMAIN or NODATA), as defined in RFC 2308, instructing resolvers on how long to cache indications of non-existent records and reducing query volume to authoritative servers for non-existent names. This value influences resolver behavior by establishing a floor on how long negative answers persist in caches, aiding efficiency but requiring adjustment in dynamic environments to avoid prolonged caching of incorrect negatives.

Administrative Functions

Serial Number Management

The SERIAL field of the SOA record is a 32-bit unsigned integer representing the version number of the original copy of the zone. It functions as a counter that the primary name server increments to signal changes in the zone data to secondary servers. For minor modifications, such as adding a single resource record, the serial is typically increased by 1; for more significant updates, administrators may adopt a date-based value to clearly indicate the timing of the change. Serial number comparisons follow the rules outlined in RFC 1982, employing arithmetic modulo 2^32 to handle the finite range of 0 to 4294967295. A secondary determines the need for a zone transfer by checking if its local precedes the primary's , using the defined ordering: one serial S1 precedes another S2 if (S1 < S2 and S2 - S1 < 2^{31}) or (S1 > S2 and S1 - S2 > 2^{31}). This ensures reliable detection of updates even across wrap-around points, with increments limited to less than 2^{31} to avoid ambiguous comparisons. To manage updates effectively and mitigate risks like prolonged sequential incrementing leading to overflow, a common strategy is the YYYYMMDDnn format, where YYYYMMDD denotes the date of modification (in four-digit year, two-digit month, and two-digit day) and nn is a sequence counter from 00 to 99. This method promotes orderly progression and aligns changes with timestamps, reducing the likelihood of errors in high-update environments. DNS software like BIND supports automation of these updates through the serial-update-method configuration option, which can be set to "increment" for simple +1 adjustments, "unixtime" for Unix timestamp values, or "date" to generate YYYYMMDD00 (or increment if the existing serial is higher). Tools such as BIND's rndc facilitate this by enabling zone reloads and DNSSEC re-signing without manual intervention, ensuring the serial advances only when necessary. Challenges in serial management include handling overflow, where the value reaches 4294967295 and subsequent increments wrap to 0 via modulo 2^32; the arithmetic rules preserve update detection provided increments remain under 2^{31}. Resetting to a low value like 1 after nearing the maximum requires caution, as it may result in incomparable ordering under RFC 1982's rules, preventing secondaries from recognizing the update and triggering transfers—in such cases, incrementing from the current value or switching to a date format is preferred. Serial mismatches between servers often signal stale zones, enabling administrators to diagnose synchronization failures by verifying SERIAL consistency across the replication topology. To minimize issues, increments should be avoided for unchanged zones, a practice enforced through careful manual editing or automated validation in management tools.

Timing Intervals and Zone Transfers

The REFRESH interval in the SOA record specifies the duration after which secondary DNS servers should poll the primary server to check for updates, typically measured in seconds and representing the expected time between successful transfers. This polling mechanism ensures that secondaries maintain synchronization with the primary by querying the SOA at the defined frequency. The RETRY interval defines the time secondary servers wait before attempting another transfer request following a failed poll, serving as a backoff period to avoid overwhelming the primary during temporary outages. Meanwhile, the EXPIRE interval sets the maximum time a secondary can use its cached without successfully contacting the primary, after which the is considered to prevent serving stale information. The MINIMUM field, also known as the negative , establishes the caching duration for negative responses such as NXDOMAIN or NODATA, helping resolvers avoid repeated queries for non-existent names and reducing network load. In the zone transfer process, secondary servers initiate polling of the primary at intervals governed by the REFRESH value; if the SOA serial number has increased, the secondary requests a full zone transfer via AXFR or an incremental update via IXFR to synchronize the zone content. Upon a failed transfer attempt, the secondary retries after the RETRY interval, continuing this loop until successful or until the cumulative time exceeds the EXPIRE threshold, at which point the secondary stops responding authoritatively for the zone. This failure handling promotes resilience while bounding the risk of prolonged desynchronization across the DNS infrastructure. Configuration guidelines for these intervals balance update freshness against server load and network stability. The REFRESH is commonly set between 1 and 24 hours to allow stable zones to update without excessive polling, though shorter values like 20 minutes may suit high-change environments. RETRY should be shorter than REFRESH, often such as 10-15 minutes, to enable prompt recovery from transient issues. EXPIRE values range from 7 to 30 days, ensuring secondaries do not serve outdated data indefinitely while accommodating extended outages. For MINIMUM, settings of 1 to 24 hours support efficient negative caching, aligning with the need to refresh non-existence information periodically without overburdening resolvers. The NOTIFY protocol complements these pull-based intervals by enabling primary servers to push notifications to secondaries upon zone changes, potentially triggering earlier transfers and reducing reliance on REFRESH polling. A common pitfall is configuring an overly short EXPIRE, which can lead to cascading failures where multiple secondaries simultaneously lose authority and flood the primary with transfer requests during recovery. Proper tuning of these intervals thus supports robust DNS operations across distributed authoritative servers.

References

  1. [1]
    RFC 1035 - Domain names - implementation and specification
    This RFC describes the details of the domain system and protocol, and assumes that the reader is familiar with the concepts discussed in a companion RFC.
  2. [2]
    What is a DNS SOA record? - Cloudflare
    The DNS 'start of authority' (SOA) record stores important information about a domain or zone such as the email address of the administrator.
  3. [3]
  4. [4]
  5. [5]
  6. [6]
  7. [7]
  8. [8]
  9. [9]
  10. [10]
  11. [11]
  12. [12]
  13. [13]
    Recommendations for DNS SOA Values - RIPE NCC
    Jun 7, 1999 · Recommended SOA values include: serial (YYYYMMDDnn), refresh (24 hours), retry (2 hours), expire (1000 hours), and minimum (2 days).
  14. [14]
  15. [15]
  16. [16]
    RFC 1912: Common DNS Operational and Configuration Errors
    ### Summary of SOA Record Timer Recommendations from RFC 1912
  17. [17]
    RFC 1982 - Serial Number Arithmetic - IETF Datatracker
    This memo defines serial number arithmetic, as used in the Domain Name System. The DNS has long relied upon serial number arithmetic, a concept which has never ...
  18. [18]
    8. Configuration Reference — BIND 9 9.20.13 documentation
    The words true and false are also accepted, as are the numbers 1 and 0 . domain_name. A quoted string which is used as a DNS name; for example: my.test.Missing: RNAME | Show results with:RNAME
  19. [19]
  20. [20]
    None
    Nothing is retrieved...<|control11|><|separator|>
  21. [21]
    None
    ### Summary of SOA Record Timing Intervals from RFC 1912
  22. [22]
    RFC 1996
    This document intentionally gives more definition to the roles of "Master," "Slave" and "Stealth" servers, their enumeration in NS RRs, and the SOA MNAME field.