Skip to content

Records

Records are addressed the way they appear in a zone file: zone, name, type, and for a single value, its data.

Terminal window
dinio record add example.com www A 192.0.2.1 --ttl 300
dinio record list example.com
dinio record show example.com www A
dinio record update example.com www A 192.0.2.1 --data 192.0.2.2
dinio record ttl example.com www A 600
dinio record rm example.com www A 192.0.2.2

NAME is relative to the zone, as in a zone file:

You write Means (in example.com)
@ example.com — the apex
www www.example.com
www.example.com www.example.com — already inside the zone, kept as is
other.org. other.org — a trailing dot makes it absolute

Output shows names relative to the zone again; record show also prints the full name.

Write the data in zone file format. Several words are joined with a space, so quotes are optional:

Terminal window
dinio record add example.com @ MX 10 mail.example.com
dinio record add example.com _sip._tcp SRV 10 5 5060 sip.example.com
dinio record add example.com @ CAA 0 issue letsencrypt.org

Data with a word starting with - must be quoted, or put after --, so it is not read as an option:

Terminal window
dinio record add example.com @ TXT "v=spf1 include:_spf.example.com -all"
dinio record add example.com @ TXT -- v=spf1 -all

When a command needs to find an existing value by its data, the comparison follows Dinio’s canonical form — 2001:DB8::0001 matches 2001:db8::1, mail.example.com matches mail.example.com.. If nothing matches, the error lists the existing values with their ids. Use --id UUID instead of data when you need to be exact.

One row per value. Filter with --name NAME and --type TYPE.

Terminal window
dinio record list example.com --type MX

Values Dinio keeps show managed=System, managed=Redirect or managed=Acme under OPTIONS; see Records Dinio keeps.

One record set: its TTL, and each value with its id, options and geo bans.

Adds a value; creates the record set if it does not exist.

Option
--ttl SECONDS TTL for a new record set; default 3600. An existing set keeps its TTL — a different --ttl is an error that points you to record ttl.
--geo-routing true|false Answer by the client’s location. A and AAAA only.
--balance-ratio N Weight among the values of the set, 0–65535. A and AAAA only.
--host-health none|up|down How the value’s health is decided; default none. Other than none: A, AAAA, SRV and MX only. auto (the health check decides) is set by health create.

record update ZONE NAME TYPE (DATA… | --id UUID)

Section titled “record update ZONE NAME TYPE (DATA… | --id UUID)”

Changes one value. Options you leave out stay as they are.

Option
--data NEW New data.
--geo-routing, --balance-ratio As for add.
--host-health none|up|down|auto auto needs a health check on the value; down takes it out of answers, e.g. for maintenance.
Terminal window
dinio record update example.com www A 192.0.2.1 --balance-ratio 3 --host-health down

Sets the TTL of the whole record set.

update, rm and ttl take --force for the zone’s own SOA/NS; see below.

record rm ZONE NAME TYPE (DATA… | --id UUID | --all)

Section titled “record rm ZONE NAME TYPE (DATA… | --id UUID | --all)”

Removes one value, or with --all every value of the set. Asks for confirmation.

Some records exist because of something else. The CLI protects them:

managed= What it is In the CLI
System The zone’s apex SOA and NS. update, rm and ttl need --force — --yes is not enough — then warn and ask once more. NS pointing elsewhere takes the zone off Dinio’s nameservers.
Redirect A redirect’s CNAME/A/AAAA. Refused, with a hint to use dinio redirect update or dinio redirect rm.
Acme The _acme-challenge TXT while a certificate is issued. Refused; it goes away on its own within minutes.

rm --all checks the whole set first and refuses before removing anything if it holds a Redirect or Acme value.

Dinio checks every record against DNS rules. A rejected change prints every violated rule and exits with 5 (conflict) or 6 (validation):

error: CNAME must be the only record at www.example.com, found A 192.0.2.1 (RFC 1034 §3.6.2, RFC 2181 §10.1) (CONFLICT, HTTP 409)