DOCS: Minor clarifications on NAMESERVER() (#3113)

This commit is contained in:
Tom Limoncelli 2024-09-16 20:21:59 -04:00 committed by GitHub
parent 06ba3cce77
commit 12a72cb729
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 9 deletions

2
.gitignore vendored
View file

@ -23,7 +23,7 @@ stack.sh
.idea/ .idea/
*.nupkg *.nupkg
.DS_Store .DS_Store
.vscode/launch.json .vscode
.jekyll-cache .jekyll-cache
types-dnscontrol.d.ts types-dnscontrol.d.ts

View file

@ -1909,20 +1909,21 @@ declare function M365_BUILDER(opts: { label?: string; mx?: boolean; autodiscover
declare function MX(name: string, priority: number, target: string, ...modifiers: RecordModifier[]): DomainModifier; declare function MX(name: string, priority: number, target: string, ...modifiers: RecordModifier[]): DomainModifier;
/** /**
* `NAMESERVER()` instructs DNSControl to inform the domain"s registrar where to find this zone. * `NAMESERVER()` instructs DNSControl to inform the domain's registrar where to find this zone.
* For some registrars this will also add NS records to the zone itself. * For some registrars this will also add NS records to the zone itself.
* *
* This takes exactly one argument: the name of the nameserver. It must end with * This takes exactly one argument: the name of the nameserver. It must end with
* a "." if it is a FQDN, just like all targets. * a "." if it is a FQDN, just like all targets.
* *
* This is different than the [`NS()`](NS.md) function, which inserts NS records * This is different than the [`NS()`](NS.md) function, which inserts NS records
* in the current zone and accepts a label. [`NS()`](NS.md) is useful for downward * in the current zone and accepts a label. [`NS()`](NS.md) is for downward
* delegations. `NAMESERVER()` is for informing upstream delegations. * delegations. `NAMESERVER()` is for informing upstream delegations.
* *
* For more information, refer to [this page](../../nameservers.md). * For more information, refer to [this page](../../nameservers.md).
* *
* ```javascript * ```javascript
* D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * D("example.com", REG_MY_PROVIDER,
* DnsProvider(DSP_MY_PROVIDER),
* DnsProvider(route53, 0), * DnsProvider(route53, 0),
* // Replace the nameservers: * // Replace the nameservers:
* NAMESERVER("ns1.myserver.com."), * NAMESERVER("ns1.myserver.com."),
@ -1941,7 +1942,7 @@ declare function MX(name: string, priority: number, target: string, ...modifiers
* Nameservers are one of the least * Nameservers are one of the least
* understood parts of DNS, so a little extra explanation is required. * understood parts of DNS, so a little extra explanation is required.
* *
* * [`NS()`](NS.md) lets you add an NS record to a zone, just like [`A()`](A.md) adds an A * * [`NS()`](NS.md) adds an NS record to a zone, just like [`A()`](A.md) adds an A
* record to the zone. This is generally used to delegate a subzone. * record to the zone. This is generally used to delegate a subzone.
* *
* * The `NAMESERVER()` directive speaks to the Registrar about how the parent should delegate the zone. * * The `NAMESERVER()` directive speaks to the Registrar about how the parent should delegate the zone.

View file

@ -8,21 +8,22 @@ parameter_types:
"modifiers...": RecordModifier[] "modifiers...": RecordModifier[]
--- ---
`NAMESERVER()` instructs DNSControl to inform the domain"s registrar where to find this zone. `NAMESERVER()` instructs DNSControl to inform the domain's registrar where to find this zone.
For some registrars this will also add NS records to the zone itself. For some registrars this will also add NS records to the zone itself.
This takes exactly one argument: the name of the nameserver. It must end with This takes exactly one argument: the name of the nameserver. It must end with
a "." if it is a FQDN, just like all targets. a "." if it is a FQDN, just like all targets.
This is different than the [`NS()`](NS.md) function, which inserts NS records This is different than the [`NS()`](NS.md) function, which inserts NS records
in the current zone and accepts a label. [`NS()`](NS.md) is useful for downward in the current zone and accepts a label. [`NS()`](NS.md) is for downward
delegations. `NAMESERVER()` is for informing upstream delegations. delegations. `NAMESERVER()` is for informing upstream delegations.
For more information, refer to [this page](../../nameservers.md). For more information, refer to [this page](../../nameservers.md).
{% code title="dnsconfig.js" %} {% code title="dnsconfig.js" %}
```javascript ```javascript
D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), D("example.com", REG_MY_PROVIDER,
DnsProvider(DSP_MY_PROVIDER),
DnsProvider(route53, 0), DnsProvider(route53, 0),
// Replace the nameservers: // Replace the nameservers:
NAMESERVER("ns1.myserver.com."), NAMESERVER("ns1.myserver.com."),
@ -43,7 +44,7 @@ END);
Nameservers are one of the least Nameservers are one of the least
understood parts of DNS, so a little extra explanation is required. understood parts of DNS, so a little extra explanation is required.
* [`NS()`](NS.md) lets you add an NS record to a zone, just like [`A()`](A.md) adds an A * [`NS()`](NS.md) adds an NS record to a zone, just like [`A()`](A.md) adds an A
record to the zone. This is generally used to delegate a subzone. record to the zone. This is generally used to delegate a subzone.
* The `NAMESERVER()` directive speaks to the Registrar about how the parent should delegate the zone. * The `NAMESERVER()` directive speaks to the Registrar about how the parent should delegate the zone.