dynadot
Set up a domain's DNS at Dynadot (A, MX, CNAME, SPF, DKIM) or add a subdomain A record, using the Dynadot API
- Command:
/go/dynadot - Category: DNS
- Required option:
<domain>(first argument), or<api-key> --setupthe first time - Output: The raw response from the Dynadot API
- Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also
Overview
/go/dynadot publishes DNS records for a domain whose DNS is hosted at Dynadot. It:
- saves your Dynadot API key (
--setup) - for a main domain, sets the A, MX, CNAME, SPF, and DKIM records GoAdmio needs
- for a subdomain, adds one A record that points to this server
The call is appended to /var/log/go/dynadot.log.
Quick start
# 1. Save your Dynadot API key (the key must come first)
/go/dynadot <api-key> --setup
# 2. Publish the records for a domain
/go/dynadot example.com
Syntax
/go/dynadot <api-key> --setup
/go/dynadot <domain>
/go/dynadot <subdomain>.<domain>
| Form | Behavior |
|---|---|
/go/dynadot <api-key> --setup |
Stores the key in GoAdmio's configuration and exits. |
/go/dynadot <domain> |
Main domain: sets the full record set (see Records). |
/go/dynadot <subdomain>.<domain> |
Subdomain: adds an A record for it, keeping the existing records. |
The command decides between main domain and subdomain from the name itself (see Main domain or subdomain). A second and third argument are accepted but ignored.
It needs curl and jq, and for a main domain a DKIM key at /etc/opendkim/<domain>/dkim.txt (created with the account; see installdkim).
Options
| Argument | Notes |
|---|---|
<api-key> |
Your Dynadot API key. Must be the first argument when used with --setup; the first argument is what gets saved. |
--setup |
Saves the key and exits. Found anywhere in the command line. |
<domain> |
The full domain name. It must be registered or managed in your Dynadot account. |
Output
The command prints the Dynadot API response (an XML document) followed by an empty line. It does not read the response, so check it yourself for errors.
Examples
# Save the API key
/go/dynadot AbC123YourDynadotKey --setup
# Main domain
/go/dynadot example.com
# Subdomain
/go/dynadot shop.example.com
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The response contains an error | The key is missing or wrong, the domain isn't in your Dynadot account, or Dynadot rejected the request. | Run --setup again with the correct key. Check your API settings at Dynadot. |
| Other DNS records disappeared after running it for a main domain | The main-domain call replaces the domain's DNS settings. | Add the records back at Dynadot. See Records. |
cat: /etc/opendkim/<domain>/dkim.txt: No such file |
The domain has no DKIM key. | Install one with installdkim. |
| The DKIM record is invalid or cut short | Only the second line of dkim.txt is used, so a key split over several lines is truncated. |
Publish the key manually at Dynadot. |
jq: command not found |
jq isn't installed. |
Install jq. |
A subdomain like a.b.example.com fails |
The command treats b.example.com as the domain. |
Add multi-level subdomains in the Dynadot dashboard. |
| A domain with a less common two-part ending is handled as a subdomain | The ending isn't in the built-in list. | Add its records in the Dynadot dashboard. |
Details
Main domain or subdomain
A name with one dot (example.com) is always a main domain. For longer names, the command removes known two-part endings (such as .co.uk or .com.au, matched by a built-in pattern plus .in.net and .com.museum) and then counts the dots: none left means a main domain, one or more means a subdomain.
Records for a main domain
The command sends one set_dns2 request:
| Type | Name | Value |
|---|---|---|
| A | main domain | This server's public IPv4 address |
| MX | main domain | imap.<domain>, priority 0 |
| CNAME | *, www, go, ftp, webmail, imap, smtp, m |
<domain> |
| TXT (SPF) | <domain> in the subdomain field |
v=spf1 +a +mx +ip4:<server-ip> ~all |
| TXT (DKIM) | dkim._domainkey |
v=DKIM1; k=rsa; p=<public key> |
There is no DMARC record. The request does not ask Dynadot to keep existing records, so they are replaced. Check the result in the Dynadot dashboard.
Subdomains
For shop.example.com, the command takes example.com as the domain and shop as the label, and adds an A record to this server's IP. The request asks Dynadot to keep the existing records.
Security
[!WARNING] The API key is stored in plain text in GoAdmio's configuration database. When you run
--setup, the key is also written to/var/log/go/dynadot.log, and it is visible in the process list while a request is running.
See also
| Command | Description |
|---|---|
cloudflare |
Manage DNS records using Cloudflare's API |
dns |
Add one or all hosted domains to Cloudflare and set up their DNS zone, proxy and cache mode, nameservers, and SSL |
dkim |
Add a DKIM TXT record to a domain's Cloudflare DNS (auto-generated or custom value) |
dmarc |
Add a DMARC TXT record to a domain's Cloudflare DNS (auto-generated or custom value) |
installdkim |
Install and configure OpenDKIM |
zone |
Create, update, or delete a DNS zone file and register it with BIND |
nameservers |
Change the nameservers for a GoAdmio server |