2017-08-16 01:46:31 +08:00
---
name: NS
parameters:
- name
- target
- modifiers...
---
NS adds a NS record to the domain. The name should be the relative label for the domain.
2020-01-30 02:47:32 +08:00
The name may not be `@` (the bare domain), as that is controlled via `NAMESERVER()` .
The difference between `NS()` and `NAMESERVER()` is explained in the `NAMESERVER()` description.
2017-08-16 01:46:31 +08:00
Target should be a string representing the NS target. If it is a single label we will assume it is a relative name on the current domain. If it contains *any* dots, it should be a fully qualified domain name, ending with a `.` .
2022-03-04 20:49:03 +08:00
{% capture example %}
2022-02-18 01:22:31 +08:00
```js
2017-08-16 01:46:31 +08:00
D("example.com", REGISTRAR, DnsProvider("R53"),
2019-05-21 10:33:50 +08:00
NS("foo", "ns1.example2.com."), // Delegate ".foo.example.com" zone to another server.
NS("foo", "ns2.example2.com."), // Delegate ".foo.example.com" zone to another server.
2017-08-16 01:46:31 +08:00
A("ns1.example2.com", "10.10.10.10"), // Glue records
A("ns2.example2.com", "10.10.10.20"), // Glue records
);
2022-02-18 01:22:31 +08:00
```
2022-03-04 20:49:03 +08:00
{% endcapture %}
2017-08-16 01:46:31 +08:00
2022-03-04 20:49:03 +08:00
{% include example.html content=example %}