dnscontrol/documentation/providers/netlify.md
Jeffrey Cafferata 7977a7b81c
DOCS: Improve consistency in code examples in language reference (#2439)
Co-authored-by: Tom Limoncelli <tal@whatexit.org>
2023-06-17 08:58:17 -04:00

947 B

Configuration

To use this provider, add an entry to creds.json with TYPE set to NETLIFY along with a Netlify account personal access token. You can also optionally add an account slug. This is typically your username on Netlify.

Examples:

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

{
  "netlify": {
    "TYPE": "NETLIFY",
    "token": "your-netlify-account-access-token",
    "slug": "account-slug" // this is optional
  }
}

{% endcode %}

Metadata

This provider does not recognize any special metadata fields unique to Netlify.

Usage

An example configuration:

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

var REG_NETLIFY = NewRegistrar("netlify");
var DSP_NETLIFY = NewDnsProvider("netlify");

D("example.com", REG_NETLIFY, DnsProvider(DSP_NETLIFY),
    A("test", "1.2.3.4")
);

{% endcode %}

Activation

DNSControl depends on a Netlify account personal access token.

Caveats

Empty MX records are not supported.