dns
The dns commands manage the DNS zones Kinsta hosts for your company and the records inside them. They work on zones, not on sites, so they take no --env.
kinstactl dns zoneskinstactl dns records list example.comkinstactl dns records add example.com A www --value 203.0.113.10Wherever a command takes a <zone>, give the zone name or its ID; a unique prefix of the name also works, and an ambiguous one fails with the matching names. Records are identified by their <type> and <name>, for example A and www. Commands that change records wait for Kinsta to finish by default, and accept --no-wait, --timeout <minutes> and --dry-run; see operations.
dns zones
Section titled “dns zones”List the DNS zones of the company.
kinstactl dns zoneskinstactl dns zones [options]List the DNS zones of the company
Kinsta API: GET /domains
The table shows the name, ID and linked site of each zone, and whether it is active. Use it to find the zone name for the other commands.
dns records list
Section titled “dns records list”List the DNS records of a zone.
kinstactl dns records list example.comkinstactl dns records list <zone> [options]List the DNS records of a zone
Arguments
| Argument | Description |
|---|---|
zone | zone name or ID, see: dns zones |
Kinsta API: GET /domains, GET /domains/{domain_id}/dns-records
The table shows the type, name and TTL of each record, and its values. A record with several values, such as a round-robin A record, shows them comma-separated.
dns records add
Section titled “dns records add”Add a DNS record to a zone.
kinstactl dns records add example.com A www --value 203.0.113.10kinstactl dns records add <zone> <type> <name> [options]Add a DNS record to a zone
Arguments
| Argument | Description |
|---|---|
zone | zone name or ID, see: dns zones |
type | record type, e.g. A |
name | record name, e.g. www.example.com |
Options
| Option | Description |
|---|---|
--value <value...> | record value; repeat the values for a round-robin record |
--ttl <seconds> | time to live in seconds, at least 300 |
--dry-run | print the resolved target and request; change nothing |
--no-wait | return the operation ID instead of waiting |
--timeout <minutes> | give up waiting after this many minutes (default 30) |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: GET /domains, POST /domains/{domain_id}/dns-records
--value is required; without it the command fails with a USAGE error, there is no prompt. Repeat the values after one --value to create a round-robin record, and set the TTL with --ttl:
kinstactl dns records add example.com A @ --value 203.0.113.10 203.0.113.11 --ttl 600--ttl is in seconds, at least 300, which is also the default.
dns records update
Section titled “dns records update”Change the TTL or values of a DNS record.
kinstactl dns records update example.com A www --ttl 600kinstactl dns records update <zone> <type> <name> [options]Change the TTL or values of a DNS record
Arguments
| Argument | Description |
|---|---|
zone | zone name or ID, see: dns zones |
type | record type, e.g. A |
name | record name, e.g. www.example.com |
Options
| Option | Description |
|---|---|
--ttl <seconds> | new time to live in seconds, at least 300 |
--add <value...> | values to add to the record |
--remove <value...> | values to remove from the record |
--dry-run | print the resolved target and request; change nothing |
--no-wait | return the operation ID instead of waiting |
--timeout <minutes> | give up waiting after this many minutes (default 30) |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: GET /domains, PUT /domains/{domain_id}/dns-records
Pass at least one of --ttl, --add and --remove; with none the command fails with Nothing to change. --add and --remove change the values of the record, each taking one or more values:
kinstactl dns records update example.com A www --add 203.0.113.11 --remove 203.0.113.10dns records delete
Section titled “dns records delete”Delete a DNS record from a zone.
kinstactl dns records delete example.com A www --yeskinstactl dns records delete <zone> <type> <name> [options]Delete a DNS record from a zone
Arguments
| Argument | Description |
|---|---|
zone | zone name or ID, see: dns zones |
type | record type, e.g. A |
name | record name, e.g. www.example.com |
Options
| Option | Description |
|---|---|
--dry-run | print the resolved target and request; change nothing |
--no-wait | return the operation ID instead of waiting |
--timeout <minutes> | give up waiting after this many minutes (default 30) |
--yes | skip the confirmation prompt |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: GET /domains, DELETE /domains/{domain_id}/dns-records
Deleting removes the record with all its values, so the command asks for confirmation. On a terminal you answer a prompt; in a script pass --yes, otherwise it fails with CONFIRMATION_REQUIRED (exit code 5).