github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE_AUTO.md (about)

     1  ---
     2  name: DOMAIN_ELSEWHERE_AUTO
     3  parameters:
     4    - name
     5    - domain
     6    - registrar
     7    - dns provider
     8  parameter_types:
     9    name: string
    10    domain: string
    11    registrar: string
    12    dns provider: string
    13  ---
    14  
    15  `DOMAIN_ELSEWHERE_AUTO()` is similar to `DOMAIN_ELSEWHERE()` but instead of
    16  a hardcoded list of nameservers, a DnsProvider() is queried.
    17  
    18  `DOMAIN_ELSEWHERE_AUTO` is useful when you control a domain's registrar but the
    19  DNS zones are managed by another system. Luckily you have enough access to that
    20  other system that you can query it to determine the zone's nameservers.
    21  
    22  For example, suppose you own a domain but the DNS servers for it are in Azure.
    23  Further suppose that something in Azure maintains the zones (automatic or
    24  human). Azure picks the nameservers for the domains automatically, and that
    25  list may change occasionally.  `DOMAIN_ELSEWHERE_AUTO` allows you to easily
    26  query Azure to determine the domain's delegations so that you do not need to
    27  hard-code them in your dnsconfig.js file.
    28  
    29  For example these two statements are equivalent:
    30  
    31  {% code title="dnsconfig.js" %}
    32  ```javascript
    33  DOMAIN_ELSEWHERE_AUTO("example.com", REG_NAMEDOTCOM, DSP_AZURE);
    34  ```
    35  {% endcode %}
    36  
    37  {% code title="dnsconfig.js" %}
    38  ```javascript
    39  D("example.com", REG_NAMEDOTCOM,
    40      NO_PURGE,
    41      DnsProvider(DSP_AZURE),
    42  END);
    43  ```
    44  {% endcode %}
    45  
    46  {% hint style="info" %}
    47  **NOTE**: The [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) is used to prevent DNSControl from changing the records.
    48  {% endhint %}