github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/language-reference/domain-modifiers/DefaultTTL.md (about)

     1  ---
     2  name: DefaultTTL
     3  parameters:
     4    - ttl
     5  parameter_types:
     6    ttl: Duration
     7  ---
     8  
     9  DefaultTTL sets the TTL for all subsequent records following it in a domain that do not explicitly set one with [`TTL`](../record-modifiers/TTL.md). If neither `DefaultTTL` or `TTL` exist for a record,
    10  the record will inherit the DNSControl global internal default of 300 seconds. See also [`DEFAULTS`](../top-level-functions/DEFAULTS.md) to override the internal defaults.
    11  
    12  NS records are currently a special case, and do not inherit from `DefaultTTL`. See [`NAMESERVER_TTL`](../domain-modifiers/NAMESERVER_TTL.md) to set a default TTL for all NS records.
    13  
    14  
    15  {% code title="dnsconfig.js" %}
    16  ```javascript
    17  D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER),
    18    DefaultTTL("4h"),
    19    A("@","1.2.3.4"), // uses default
    20    A("foo", "2.3.4.5", TTL(600)), // overrides default
    21  END);
    22  ```
    23  {% endcode %}
    24  
    25  The DefaultTTL duration is the same format as [`TTL`](../record-modifiers/TTL.md), an integer number of seconds
    26  or a string with a unit such as `"4d"`.