> For the complete documentation index, see [llms.txt](https://docs.dnscontrol.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dnscontrol.org/provider/autodns.md). Agents can also search and read this documentation through its [MCP server](https://docs.dnscontrol.org/~gitbook/mcp).

# AutoDNS

### Configuration

To use this provider, add an entry to `creds.json` with `TYPE` set to `AUTODNS` along with [username, password and a context](https://help.internetx.com/display/APIXMLEN/Authentication#Authentication-AuthenticationviaCredentials\(username/password/context\)).

Example:

{% code title="creds.json" %}

```json
{
  "autodns": {
    "TYPE": "AUTODNS",
    "username": "autodns.service-account@example.com",
    "password": "[***]",
    "context": "33004"
  }
}
```

{% endcode %}

#### Two factor authentication

If two-factor authentication has been enabled on your account you will also need to provide a valid TOTP code. This can also be done via an environment variable:

{% code title="creds.json" %}

```json
{
  "autodns": {
    "TYPE": "AUTODNS",
    "username": "autodns.service-account@example.com",
    "password": "[***]",
    "context": "33004",
    "totp": "$AUTODNS_TOTP"
  }
}
```

{% endcode %}

and then you can run

```shell
AUTODNS_TOTP=123456 dnscontrol preview
```

It is also possible to directly provide the shared TOTP secret using the key "totp-key" in `creds.json`. This secret is only available when first enabling two-factor authentication.

**Security Warning**:

* Anyone with access to this `creds.json` file will have *full* access to your AutoDNS account and will be able to modify and delete your DNS entries.
* Storing the shared secret together with the password weakens two factor authentication because both factors are stored in a single place.

{% code title="creds.json" %}

```json
{
  "autodns": {
    "TYPE": "AUTODNS",
    "username": "autodns.service-account@example.com",
    "password": "[***]",
    "context": "33004",
    "totp-key": "yourTOTPSharedSecret"
  }
}
```

{% endcode %}

`totp` and `totp-key` must not be set at the same time. Omit both if the account does not use two factor authentication.

#### Including sub-user zones

By default DNSControl only sees zones owned directly by the configured user. If you authenticate as a master/admin user and want `get-zones` (and the `all` keyword) to also include zones owned by sub-users — the same optional "include subusers" toggle the AutoDNS web UI offers — set `children` to `"true"`:

{% code title="creds.json" %}

```json
{
  "autodns": {
    "TYPE": "AUTODNS",
    "username": "autodns.service-account@example.com",
    "password": "[***]",
    "context": "33004",
    "children": "true"
  }
}
```

{% endcode %}

### Usage

An example configuration:

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

```javascript
D("example.com", REGISTRAR(), SERVICE("autodns"),
    A("test", "1.2.3.4"),
);
```

{% endcode %}

### Feature Summary

* Support Level and Type
  * [Official Support](https://docs.dnscontrol.org/provider/index.md#providers-with-official-support): ❌
  * DNS Provider: ✅
  * Registrar: ✅
* API-level Features
  * [Concurrent fetching](https://docs.dnscontrol.org/advanced-features/concurrency-verified.md): ✅
  * [dual host](https://docs.dnscontrol.org/advanced-features/dual-host.md): ❌
  * create-domains: ✅
  * [get-zones](https://docs.dnscontrol.org/commands/get-zones.md): ✅
  * [AUTODNSSEC](https://docs.dnscontrol.org/language-reference/domain-modifiers/autodnssec_on.md): ❌
* Supported Record Types
  * [A](https://docs.dnscontrol.org/language-reference/domain-modifiers/a.md) [AAAA](https://docs.dnscontrol.org/language-reference/domain-modifiers/aaaa.md) [ALIAS](https://docs.dnscontrol.org/language-reference/domain-modifiers/alias.md) [CAA](https://docs.dnscontrol.org/language-reference/domain-modifiers/caa.md) [CNAME](https://docs.dnscontrol.org/language-reference/domain-modifiers/cname.md) [MX](https://docs.dnscontrol.org/language-reference/domain-modifiers/mx.md) [NS](https://docs.dnscontrol.org/language-reference/domain-modifiers/ns.md) [PTR](https://docs.dnscontrol.org/language-reference/domain-modifiers/ptr.md) [SRV](https://docs.dnscontrol.org/language-reference/domain-modifiers/srv.md) [TXT](https://docs.dnscontrol.org/language-reference/domain-modifiers/txt.md)
