Skip to content

Commit

Permalink
DOCS: Minor clarifications on NAMESERVER() (#3113)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlimoncelli authored Sep 17, 2024
1 parent 06ba3cc commit 12a72cb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ stack.sh
.idea/
*.nupkg
.DS_Store
.vscode/launch.json
.vscode
.jekyll-cache
types-dnscontrol.d.ts

Expand Down
9 changes: 5 additions & 4 deletions commands/types/dnscontrol.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
* `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.
*
* This takes exactly one argument: the name of the nameserver. It must end with
* a "." if it is a FQDN, just like all targets.
*
* 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.
*
* For more information, refer to [this page](../../nameservers.md).
*
* ```javascript
* D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER),
* D("example.com", REG_MY_PROVIDER,
* DnsProvider(DSP_MY_PROVIDER),
* DnsProvider(route53, 0),
* // Replace the nameservers:
* NAMESERVER("ns1.myserver.com."),
Expand All @@ -1941,7 +1942,7 @@ declare function MX(name: string, priority: number, target: string, ...modifiers
* Nameservers are one of the least
* 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.
*
* * The `NAMESERVER()` directive speaks to the Registrar about how the parent should delegate the zone.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ parameter_types:
"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.

This takes exactly one argument: the name of the nameserver. It must end with
a "." if it is a FQDN, just like all targets.

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.

For more information, refer to [this page](../../nameservers.md).

{% code title="dnsconfig.js" %}
```javascript
D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER),
D("example.com", REG_MY_PROVIDER,
DnsProvider(DSP_MY_PROVIDER),
DnsProvider(route53, 0),
// Replace the nameservers:
NAMESERVER("ns1.myserver.com."),
Expand All @@ -43,7 +44,7 @@ END);
Nameservers are one of the least
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.

* The `NAMESERVER()` directive speaks to the Registrar about how the parent should delegate the zone.
Expand Down

0 comments on commit 12a72cb

Please sign in to comment.