dnscontrol/docs/_functions/domain/SOA.md
Jed Fox 1e337abcdf
Provide TypeScript typings for dnsconfig.js (#1830)
Co-authored-by: Jeffrey Cafferata <jeffrey@jcid.nl>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-01-12 16:59:42 -05:00

952 B

name parameters parameter_types
SOA
name
ns
mbox
refresh
retry
expire
minttl
modifiers...
name ns mbox refresh retry expire minttl modifiers...
string string string number number number number RecordModifier[]

SOA adds an SOA record to a domain. The name should be @. ns and mbox are strings. The other fields are unsigned 32-bit ints.

{% capture example %}

D("example.com", REG_THIRDPARTY, DnsProvider("DNS_BIND"),
  SOA("@", "ns3.example.org.", "hostmaster.example.org.", 3600, 600, 604800, 1440),
);

{% endcapture %}

{% include example.html content=example %}

Notes:

  • The serial number is managed automatically. It isn't even a field in SOA().
  • Most providers automatically generate SOA records. They will ignore any SOA() statements.

There is more info about SOA in the documentation for the BIND provider.