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.
Before You Start
Section titled “Before You Start”- The
zcpCLI installed and authenticated. See the CLI installation guide and CLI Quickstart. - A domain you control at its registrar.
Create a Zone
Section titled “Create a Zone”Add your domain to ZCP. This creates the DNS zone ZSoftly serves.
zcp dns create --name example.com --project default-9Output:
FIELD VALUESlug examplecomName example.comStatus falseCreated 2026-07-18T21:08:26.000000ZZCP 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.
Read Your Name Servers
Section titled “Read Your Name Servers”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 examplecomOutput:
FIELD VALUESlug examplecomName example.comStatus trueCreated 2026-07-18T21:08:26.000000ZUpdated 2026-07-18T21:08:26.000000Z
Records (2):NAME TYPE CONTENT TTLexample.com. SOA ns1.zsoftly.ca. hostmaster.zsoftly.ca. 2026071801 10800 3600 604800 3600 3600example.com. NS ns1.zsoftly.ca., ns2.zsoftly.ca. 3600Point your registrar at both name servers before you send live traffic. See Domains for the per-registrar steps and the Cloudflare Registrar exception.
Add Records
Section titled “Add Records”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 recordzcp dns record-create --domain examplecom --name www --type A --content 203.0.113.10
# IPv6 addresszcp dns record-create --domain examplecom --name ipv6 --type AAAA --content 2001:db8::10
# Alias one name to anotherzcp dns record-create --domain examplecom --name blog --type CNAME --content www.example.com.
# Text record for SPF or domain verificationzcp 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 10Record rules:
- The default TTL is
14400seconds (4 hours). Override it with--ttl, for example--ttl 3600. - Wrap
TXTcontent in escaped quotes, for example'"v=spf1 -all"', so the quotes reach the record. - End a
CNAMEtarget with a trailing dot (www.example.com.) to keep it fully qualified. - An
MXrecord needs--priority. Put the mail server in--contentand 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, andNS.SRVandLOCare not available yet.
List and Show Records
Section titled “List and Show Records”zcp dns show prints the zone and every record it holds.
zcp dns show examplecomRecords (6):NAME TYPE CONTENT TTLwww.example.com. A 203.0.113.10 14400ipv6.example.com. AAAA 2001:db8::10 14400blog.example.com. CNAME www.example.com. 14400example.com. TXT "v=spf1 -all" 14400example.com. SOA ns1.zsoftly.ca. hostmaster.zsoftly.ca. 2026071807 10800 3600 604800 3600 3600example.com. NS ns1.zsoftly.ca., ns2.zsoftly.ca. 3600For scripting, add --output json and pipe to jq.
zcp dns list --output jsonzcp dns show examplecom --output jsonUpdate a Record
Section titled “Update a Record”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 --yeszcp dns record-create --domain examplecom --name www --type A --content 203.0.113.20Delete a Record
Section titled “Delete a Record”Address the record set by name and type.
zcp dns record-delete --domain examplecom --name www --type AAdd --yes to skip the confirmation prompt in scripts. Output:
DNS record A "www.example.com." deleted from domain "examplecom".Delete a Zone
Section titled “Delete a Zone”This removes the zone and all of its records.
zcp dns delete examplecomAdd --yes to skip the confirmation prompt.
Verify
Section titled “Verify”Query the ZSoftly name servers directly to confirm a record before global propagation finishes.
# Ask a ZSoftly name server for the recorddig A www.example.com @ns1.zsoftly.ca +short
# After you delegate at your registrar, query any public resolverdig A www.example.com @1.1.1.1 +shortSee also: DNS Overview, Domains, DNS Records, Worked examples, Manage DNS with the API, Troubleshooting, CLI Reference