CLI
DNS commands
Manage DNS zones and records, including geographic routing.
On this page8 sections
Zones#
List zones#
Text
$ edge dns list
ID DOMAIN RECORDS STATUS CREATED
zone-abc123 example.com 24 active 2025-01-15
zone-def456 example.org 12 active 2025-02-01
zone-ghi789 mysite.io 8 active 2025-02-10Create a zone#
Text
$ edge dns create --domain example.com
Creating zone... done
ID: zone-jkl012
Domain: example.com
Status: active
Nameservers: ns1.edge.network, ns2.edge.network
Update your domain's nameservers at your registrar to activate DNS.Get zone details#
Text
$ edge dns get zone-abc123
ID: zone-abc123
Domain: example.com
Status: active
Created: 2025-01-15 10:30:00 UTC
Nameservers: ns1.edge.network, ns2.edge.network
Records: 24
A: 8
AAAA: 4
CNAME: 6
MX: 2
TXT: 4
Queries (24h): 1,245,678Delete a zone#
Terminal
# Delete with confirmation
edge dns delete zone-abc123
# Delete without confirmation
edge dns delete zone-abc123 --yesImport and export#
Export zone#
Terminal
# Export as JSON
edge dns export zone-abc123
# Export as BIND zone file
edge dns export zone-abc123 --format bind > example.com.zone
# Export as JSON to file
edge dns export zone-abc123 > example.com.jsonImport zone#
Terminal
# Import from JSON file
edge dns import zone-abc123 --file records.json
# Import from BIND zone file
edge dns import zone-abc123 --file example.com.zone --format bindRecords#
List records#
Text
$ edge dns records list zone-abc123
TYPE NAME DATA TTL GEO
A @ 192.0.2.1 300 -
A @ 192.0.2.2 300 EU
A www 192.0.2.1 300 -
AAAA @ 2001:db8::1 300 -
CNAME cdn cdn.edge.network. 300 -
MX @ mail.example.com. 3600 -
TXT @ "v=spf1 include:_spf..." 3600 -Add records#
Terminal
# Add an A record
edge dns records add zone-abc123 --type A --name www --data 192.0.2.1 --ttl 300
# Add a CNAME record
edge dns records add zone-abc123 --type CNAME --name cdn --data cdn.edge.network
# Add an MX record
edge dns records add zone-abc123 --type MX --name @ --data mail.example.com --priority 10
# Add a TXT record
edge dns records add zone-abc123 --type TXT --name @ --data "v=spf1 include:_spf.example.com ~all"Geographic routing#
Terminal
# Add record with geo routing
edge dns records add zone-abc123 --type A --name @ --data 185.1.1.1 \
--geo EU=185.2.2.2 \
--geo NA=185.3.3.3 \
--geo US-WEST=185.4.4.4 \
--geo GB=185.5.5.5
# Geo codes follow this hierarchy:
# Region: NA, EU, AS, OC, AF, ME, SA
# Country: US, GB, DE, FR, JP, etc. (ISO 3166-1)
# Zone: US-WEST, US-EAST, CN-NORTH, etc.Update a record#
Terminal
# Update record data
edge dns records update zone-abc123 rec-xyz789 --data 192.0.2.2
# Update TTL
edge dns records update zone-abc123 rec-xyz789 --ttl 600
# Update multiple fields
edge dns records update zone-abc123 rec-xyz789 --data 192.0.2.2 --ttl 600Delete a record#
Terminal
# Delete with confirmation
edge dns records delete zone-abc123 rec-xyz789
# Delete without confirmation
edge dns records delete zone-abc123 rec-xyz789 --yesMetrics#
Text
$ edge dns metrics zone-abc123
Period: Last 24 hours
Total Queries: 1,245,678
Response Time: 2.3ms avg
By Record Type:
A: 892,345 queries
AAAA: 201,456 queries
CNAME: 112,345 queries
MX: 32,456 queries
TXT: 7,076 queries
By Country:
United States: 456,789
United Kingdom: 234,567
Germany: 178,234
France: 89,012
Other: 287,076Terminal
# Specify time period
edge dns metrics zone-abc123 --period 7d
# Filter by record type
edge dns metrics zone-abc123 --record-type A
# Export as CSV
edge dns metrics zone-abc123 --export csv > dns-metrics.csvSupported record types#
| Type | Description | Geo support |
|---|---|---|
A |
IPv4 address | ✓ |
AAAA |
IPv6 address | ✓ |
CNAME |
Canonical name (alias) | ✓ |
MX |
Mail exchange | ✗ |
TXT |
Text record | ✗ |
NS |
Nameserver | ✗ |
CAA |
Certificate Authority Authorization | ✗ |
SRV |
Service record | ✗ |
DNS Examiner#
Run AI-powered analysis of your DNS configuration. It checks email deliverability, security, nameserver delegation and best practices.
Terminal
# Run examination on a zone
edge dns examine <zone-id>
# View the last examination result
edge dns examine-last <zone-id>
# Output as JSON
edge dns examine <zone-id> --output jsonExaminations take up to 30 seconds. Results are saved and can be retrieved with examine-last.
Common flags#
| Flag | Description |
|---|---|
--domain |
Domain name for zone |
--type |
Record type (A, AAAA, CNAME, etc.) |
--name |
Record name (@ for root) |
--data |
Record value/data |
--ttl |
Time to live in seconds |
--priority |
Priority for MX records |
--geo |
Geographic routing (CODE=value) |
--format |
Import/export format (json, bind) |
Next steps
Something unclear or out of date? Tell us