Skip to content

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.

Terminal window
kinstactl dns zones
kinstactl dns records list example.com
kinstactl dns records add example.com A www --value 203.0.113.10

Wherever 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.

List the DNS zones of the company.

Terminal window
kinstactl dns zones
kinstactl 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.

List the DNS records of a zone.

Terminal window
kinstactl dns records list example.com
kinstactl dns records list <zone> [options]

List the DNS records of a zone

Arguments

ArgumentDescription
zonezone 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.

Add a DNS record to a zone.

Terminal window
kinstactl dns records add example.com A www --value 203.0.113.10
kinstactl dns records add <zone> <type> <name> [options]

Add a DNS record to a zone

Arguments

ArgumentDescription
zonezone name or ID, see: dns zones
typerecord type, e.g. A
namerecord name, e.g. www.example.com

Options

OptionDescription
--value <value...>record value; repeat the values for a round-robin record
--ttl <seconds>time to live in seconds, at least 300
--dry-runprint the resolved target and request; change nothing
--no-waitreturn 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:

Terminal window
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.

Change the TTL or values of a DNS record.

Terminal window
kinstactl dns records update example.com A www --ttl 600
kinstactl dns records update <zone> <type> <name> [options]

Change the TTL or values of a DNS record

Arguments

ArgumentDescription
zonezone name or ID, see: dns zones
typerecord type, e.g. A
namerecord name, e.g. www.example.com

Options

OptionDescription
--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-runprint the resolved target and request; change nothing
--no-waitreturn 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:

Terminal window
kinstactl dns records update example.com A www --add 203.0.113.11 --remove 203.0.113.10

Delete a DNS record from a zone.

Terminal window
kinstactl dns records delete example.com A www --yes
kinstactl dns records delete <zone> <type> <name> [options]

Delete a DNS record from a zone

Arguments

ArgumentDescription
zonezone name or ID, see: dns zones
typerecord type, e.g. A
namerecord name, e.g. www.example.com

Options

OptionDescription
--dry-runprint the resolved target and request; change nothing
--no-waitreturn the operation ID instead of waiting
--timeout <minutes>give up waiting after this many minutes (default 30)
--yesskip 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).