# NewRegistrar

NewRegistrar activates a Registrar Provider specified in `creds.json`. A registrar maintains the domain's registration and delegation (i.e. the nameservers for the domain). DNSControl only manages the delegation.

* `name` must match the name of an entry in `creds.json`.
* `type` is deprecated. The provider type is read from the `TYPE` field in `creds.json`.
* `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](/provider/index.md) for details.

This function will return an opaque string that should be assigned to a variable name for use in [D](/language-reference/top-level-functions/d.md) directives.

{% code title="dnsconfig.js" %}

```javascript
var REG_MYNDC = NewRegistrar("mynamedotcom");
var DNS_MYAWS = NewDnsProvider("myaws");

D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS),
  A("@","1.2.3.4"),
);
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dnscontrol.org/language-reference/top-level-functions/newregistrar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
