2021-09-03 03:41:22 +08:00
|
|
|
---
|
|
|
|
name: DOMAIN_ELSEWHERE
|
|
|
|
parameters:
|
2023-01-23 00:20:15 +08:00
|
|
|
- name
|
2021-09-03 03:41:22 +08:00
|
|
|
- registrar
|
2023-01-13 05:59:42 +08:00
|
|
|
- nameserver_names
|
|
|
|
parameter_types:
|
2023-01-23 00:20:15 +08:00
|
|
|
name: string
|
2023-01-13 05:59:42 +08:00
|
|
|
registrar: string
|
|
|
|
nameserver_names: string[]
|
2021-09-03 03:41:22 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
`DOMAIN_ELSEWHERE()` is a helper macro that lets you easily indicate that
|
|
|
|
a domain's zones are managed elsewhere. That is, it permits you easily delegate
|
|
|
|
a domain to a hard-coded list of DNS servers.
|
|
|
|
|
|
|
|
`DOMAIN_ELSEWHERE` is useful when you control a domain's registrar but not the
|
|
|
|
DNS servers. For example, suppose you own a domain but the DNS servers are run
|
|
|
|
by someone else, perhaps a SaaS product you've subscribed to or a DNS server
|
|
|
|
that is run by your brother-in-law who doesn't trust you with the API keys that
|
|
|
|
would let you maintain the domain using DNSControl. You need an easy way to
|
|
|
|
point (delegate) the domain at a specific list of DNS servers.
|
|
|
|
|
|
|
|
For example these two statements are equivalent:
|
|
|
|
|
2023-03-14 04:30:21 +08:00
|
|
|
{% code title="dnsconfig.js" %}
|
2023-01-20 20:56:20 +08:00
|
|
|
```javascript
|
2023-06-18 11:35:13 +08:00
|
|
|
DOMAIN_ELSEWHERE("example.com", REG_MY_PROVIDER, ["ns1.foo.com", "ns2.foo.com"]);
|
2023-01-30 02:15:03 +08:00
|
|
|
```
|
2023-03-14 04:30:21 +08:00
|
|
|
{% endcode %}
|
2021-09-03 03:41:22 +08:00
|
|
|
|
2023-03-14 04:30:21 +08:00
|
|
|
{% code title="dnsconfig.js" %}
|
2023-01-30 02:15:03 +08:00
|
|
|
```javascript
|
2023-06-18 11:35:13 +08:00
|
|
|
D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER),
|
2021-09-03 03:41:22 +08:00
|
|
|
NO_PURGE,
|
|
|
|
NAMESERVER("ns1.foo.com"),
|
|
|
|
NAMESERVER("ns2.foo.com")
|
|
|
|
);
|
|
|
|
```
|
2023-03-14 04:30:21 +08:00
|
|
|
{% endcode %}
|
2021-09-03 03:41:22 +08:00
|
|
|
|
2023-01-20 20:56:20 +08:00
|
|
|
{% hint style="info" %}
|
2023-03-16 06:43:57 +08:00
|
|
|
**NOTE**: The [`NO_PURGE`](../domain/NO_PURGE.md) is used out of abundance of caution but since no
|
2021-09-03 03:41:22 +08:00
|
|
|
`DnsProvider()` statements exist, no updates would be performed.
|
2023-01-20 20:56:20 +08:00
|
|
|
{% endhint %}
|