Skip to content
Live $100 credit at signup, up to $300 total Offer ends December 31, 2026 Get started →

Manage DNS with the CLI

The zcp CLI manages your DNS zones and records from the terminal. This page covers each step: create a zone, read the name servers to delegate to, add and remove records, and verify the result.

Add your domain to ZCP. This creates the DNS zone ZSoftly serves.

zcp dns create --name example.com --project default-9

Output:

FIELD VALUE
Slug examplecom
Name example.com
Status false
Created 2026-07-18T21:08:26.000000Z

ZCP generates a slug from the domain name. Every later command addresses the zone by this slug, not by the domain name. Copy it from this output or from zcp dns list. The Status value turns active shortly after creation.

When you create a zone, ZCP adds its SOA and NS records for you. The NS record set holds the two name servers you point your registrar at.

zcp dns show examplecom

Output:

FIELD VALUE
Slug examplecom
Name example.com
Status true
Created 2026-07-18T21:08:26.000000Z
Updated 2026-07-18T21:08:26.000000Z
Records (2):
NAME TYPE CONTENT TTL
example.com. SOA ns1.zsoftly.ca. hostmaster.zsoftly.ca. 2026071801 10800 3600 604800 3600 3600
example.com. NS ns1.zsoftly.ca., ns2.zsoftly.ca. 3600

Point your registrar at both name servers before you send live traffic. See Domains for the per-registrar steps and the Cloudflare Registrar exception.

Use zcp dns record-create with the zone slug, a relative name, a type, and the content.

# Apex A record (use @ for the zone root)
zcp dns record-create --domain examplecom --name @ --type A --content 203.0.113.10
# Subdomain A record
zcp dns record-create --domain examplecom --name www --type A --content 203.0.113.10
# IPv6 address
zcp dns record-create --domain examplecom --name ipv6 --type AAAA --content 2001:db8::10
# Alias one name to another
zcp dns record-create --domain examplecom --name blog --type CNAME --content www.example.com.
# Text record for SPF or domain verification
zcp dns record-create --domain examplecom --name @ --type TXT --content '"v=spf1 -all"'
# Mail server (MX needs a priority)
zcp dns record-create --domain examplecom --name @ --type MX --content mail.example.com. --priority 10

Record rules:

  • The default TTL is 14400 seconds (4 hours). Override it with --ttl, for example --ttl 3600.
  • Wrap TXT content in escaped quotes, for example '"v=spf1 -all"', so the quotes reach the record.
  • End a CNAME target with a trailing dot (www.example.com.) to keep it fully qualified.
  • An MX record needs --priority. Put the mail server in --content and the preference number in --priority, for example --priority 10. The CLI stops with an error if you leave it off.
  • Supported types are A, AAAA, CNAME, MX, TXT, CAA, and NS. SRV and LOC are not available yet.

zcp dns show prints the zone and every record it holds.

zcp dns show examplecom
Records (6):
NAME TYPE CONTENT TTL
www.example.com. A 203.0.113.10 14400
ipv6.example.com. AAAA 2001:db8::10 14400
blog.example.com. CNAME www.example.com. 14400
example.com. TXT "v=spf1 -all" 14400
example.com. SOA ns1.zsoftly.ca. hostmaster.zsoftly.ca. 2026071807 10800 3600 604800 3600 3600
example.com. NS ns1.zsoftly.ca., ns2.zsoftly.ca. 3600

For scripting, add --output json and pipe to jq.

zcp dns list --output json
zcp dns show examplecom --output json

There is no update command. To change a record, delete it and create it again with the new value.

zcp dns record-delete --domain examplecom --name www --type A --yes
zcp dns record-create --domain examplecom --name www --type A --content 203.0.113.20

Address the record set by name and type.

zcp dns record-delete --domain examplecom --name www --type A

Add --yes to skip the confirmation prompt in scripts. Output:

DNS record A "www.example.com." deleted from domain "examplecom".

This removes the zone and all of its records.

zcp dns delete examplecom

Add --yes to skip the confirmation prompt.

Query the ZSoftly name servers directly to confirm a record before global propagation finishes.

# Ask a ZSoftly name server for the record
dig A www.example.com @ns1.zsoftly.ca +short
# After you delegate at your registrar, query any public resolver
dig A www.example.com @1.1.1.1 +short

See also: DNS Overview, Domains, DNS Records, Worked examples, Manage DNS with the API, Troubleshooting, CLI Reference