2022-11-29 00:01:35 +08:00
|
|
|
## 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:
|
|
|
|
|
2023-03-03 05:17:27 +08:00
|
|
|
{% code title="creds.json" %}
|
2022-11-29 00:01:35 +08:00
|
|
|
```json
|
|
|
|
{
|
|
|
|
"netlify": {
|
|
|
|
"TYPE": "NETLIFY",
|
|
|
|
"token": "your-netlify-account-access-token",
|
|
|
|
"slug": "account-slug" // this is optional
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
2023-03-03 05:17:27 +08:00
|
|
|
{% endcode %}
|
2022-11-29 00:01:35 +08:00
|
|
|
|
|
|
|
## Metadata
|
|
|
|
This provider does not recognize any special metadata fields unique to Netlify.
|
|
|
|
|
|
|
|
## Usage
|
2023-03-11 21:42:01 +08:00
|
|
|
An example configuration:
|
2022-11-29 00:01:35 +08:00
|
|
|
|
2023-03-11 21:42:01 +08:00
|
|
|
{% code title="dnsconfig.js" %}
|
2023-01-20 20:56:20 +08:00
|
|
|
```javascript
|
2022-11-29 00:01:35 +08:00
|
|
|
var REG_NETLIFY = NewRegistrar("netlify");
|
|
|
|
var DSP_NETLIFY = NewDnsProvider("netlify");
|
|
|
|
|
|
|
|
D("example.tld", REG_NETLIFY, DnsProvider(DSP_NETLIFY),
|
|
|
|
A("test", "1.2.3.4")
|
|
|
|
);
|
|
|
|
```
|
2023-03-11 21:42:01 +08:00
|
|
|
{% endcode %}
|
2022-11-29 00:01:35 +08:00
|
|
|
|
|
|
|
## Activation
|
|
|
|
DNSControl depends on a Netlify account personal access token.
|
|
|
|
|
|
|
|
## Caveats
|
|
|
|
Empty MX records are not supported.
|
|
|
|
|
|
|
|
|