github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/language-reference/top-level-functions/NewRegistrar.md (about) 1 --- 2 name: NewRegistrar 3 parameters: 4 - name 5 - type 6 - meta 7 parameter_types: 8 name: string 9 type: string? 10 meta: object? 11 return: string 12 --- 13 14 NewRegistrar activates a Registrar Provider specified in `creds.json`. 15 A registrar maintains the domain's registration and delegation (i.e. the 16 nameservers for the domain). DNSControl only manages the delegation. 17 18 * `name` must match the name of an entry in `creds.json`. 19 * `type` specifies a valid DNS provider type identifier listed on the [provider page](../../providers.md). 20 * Starting with [v3.16](../../v316.md), the type is optional. If it is absent, the `TYPE` field in `creds.json` is used instead. You can leave it out. (Thanks to JavaScript magic, you can leave it out even when there are more fields). 21 * Starting with v4.0, specifying the type may be an error. Please add the `TYPE` field to `creds.json` and remove this parameter from `dnsconfig.js` to prepare. 22 * `meta` is a way to send additional parameters to the provider. It is optional and only certain providers use it. See the [individual provider docs](../../providers.md) for details. 23 24 This function will return an opaque string that should be assigned to a variable name for use in [D](D.md) directives. 25 26 Prior to [v3.16](../../v316.md): 27 28 {% code title="dnsconfig.js" %} 29 ```javascript 30 var REG_MYNDC = NewRegistrar("mynamedotcom", "NAMEDOTCOM"); 31 var DNS_MYAWS = NewDnsProvider("myaws", "ROUTE53"); 32 33 D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), 34 A("@","1.2.3.4"), 35 END); 36 ``` 37 {% endcode %} 38 39 In [v3.16](../../v316.md) and later: 40 41 {% code title="dnsconfig.js" %} 42 ```javascript 43 var REG_MYNDC = NewRegistrar("mynamedotcom"); 44 var DNS_MYAWS = NewDnsProvider("myaws"); 45 46 D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), 47 A("@","1.2.3.4"), 48 END); 49 ``` 50 {% endcode %}