{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "name": "Edge CLI DNS commands | Edge Docs",
  "headline": "Edge CLI DNS commands | Edge Docs",
  "description": "Edge CLI DNS command reference: create zones, add and update records, set up geographic routing, import and export BIND files, and view query metrics.",
  "url": "https://edge.network/docs/cli/dns",
  "image": "https://edge.network/og/docs__cli__dns.png",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Edge Network",
    "url": "https://edge.network",
    "logo": "https://edge.network/favicon.svg"
  },
  "isPartOf": {
    "@type": "WebSite",
    "name": "Edge Network",
    "url": "https://edge.network"
  },
  "breadcrumb": {
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://edge.network"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Docs",
        "item": "https://edge.network/docs"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Cli",
        "item": "https://edge.network/docs/cli"
      },
      {
        "@type": "ListItem",
        "position": 4,
        "name": "Dns",
        "item": "https://edge.network/docs/cli/dns"
      }
    ]
  },
  "section": "documentation/cli",
  "articleBody": "Docs CDN Deployments, domains, caching, purging and on-the-fly image optimisation. Getting started \n Deployments \n Domains & SSL \n Compute Virtual machines in seconds: networking, firewalls, backups and SSH keys. Getting started \n Creating VMs \n Managing VMs \n DNS Zones, records, geo-routing, backups and development domains. Getting started \n Zone management \n DNS records \n Storage S3-compatible buckets, access keys, presigned URLs and multipart uploads. Getting started \n Buckets \n Access keys \n Shield Privacy-first bot protection: widget modes, siteverify and verified agents. Getting started \n Widget modes \n JavaScript API \n Assist AI answers from your own content: widget, ingestion and the API. Getting started \n Widget & embedding \n Content ingestion \n REST API Manage every Edge resource over HTTPS with API keys. Authentication \n Errors \n Versioning \n Compute \n CDN \n DNS \n CLI One binary for macOS, Linux and Windows to script every product. Installation \n Authentication \n Compute commands \n CDN commands \n DNS commands \n Storage commands \n Dev tooling Command palette and keyboard shortcuts across the console. Command palette \n Agent tooling Let AI agents deploy and manage infrastructure: discovery, MCP and access codes. Start with the overview MCP server \n MCP tool reference \n Connect your tool \n Framework wrappers \n Self-signup \n Access codes \n Discovery endpoint \n Deploy a static site \n Deploy an app \n Projects \n Bot protection \n AI answers \n Account & support Teams, security, audit logs, alerts, billing tools and support. Start with the overview Teams \n Referral programme \n Cost Advisor \n Security \n Two-factor auth \n Audit log \n Alerts \n Support tickets \n Search the docs ⌘K Console Products\n\n CDN Compute DNS Storage Shield Assist Developer tools\n\n REST API CLI Overview Installation Authentication Compute commands CDN commands DNS commands Storage commands Shield commands Configuration Dev tooling Agents\n\n Agent tooling Account\n\n Account & support Zones Copy Anchor Link \n\n List zones Copy Anchor Link \n\n Output Copy Text $ edge dns list \n ID DOMAIN RECORDS STATUS CREATED \n zone-abc123 example.com 24 active 2025-01-15 \n zone-def456 example.org 12 active 2025-02-01 \n zone-ghi789 mysite.io 8 active 2025-02-10 Create a zone Copy Anchor Link \n\n Output Copy Text $ edge dns create --domain example.com \n \n Creating zone... done \n \n ID: zone-jkl012 \n Domain: example.com \n Status: active \n Nameservers: ns1.edge.network, ns2.edge.network \n \n Update your domain&#x27;s nameservers at your registrar to activate DNS. Get zone details Copy Anchor Link \n\n Output Copy Text $ edge dns get zone-abc123 \n ID: zone-abc123 \n Domain: example.com \n Status: active \n Created: 2025-01-15 10:30:00 UTC \n Nameservers: ns1.edge.network, ns2.edge.network \n \n Records: 24 \n A: 8 \n AAAA: 4 \n CNAME: 6 \n MX: 2 \n TXT: 4 \n \n Queries (24h): 1,245,678 Delete a zone Copy Anchor Link \n\n Terminal Copy Text # Delete with confirmation \n edge dns delete zone-abc123 \n \n # Delete without confirmation \n edge dns delete zone-abc123 --yes Import and export Copy Anchor Link \n\n Export zone Copy Anchor Link \n\n Terminal Copy Text # Export as JSON \n edge dns export zone-abc123 \n \n # Export as BIND zone file \n edge dns export zone-abc123 --format bind > example.com.zone \n \n # Export as JSON to file \n edge dns export zone-abc123 > example.com.json Import zone Copy Anchor Link \n\n Terminal Copy Text # Import from JSON file \n edge dns import zone-abc123 --file records.json \n \n # Import from BIND zone file \n edge dns import zone-abc123 --file example.com.zone --format bind Records Copy Anchor Link \n\n List records Copy Anchor Link \n\n Output Copy Text $ edge dns records list zone-abc123 \n TYPE NAME DATA TTL GEO \n A @ 192.0.2.1 300 - \n A @ 192.0.2.2 300 EU \n A www 192.0.2.1 300 - \n AAAA @ 2001:db8::1 300 - \n CNAME cdn cdn.edge.network. 300 - \n MX @ mail.example.com. 3600 - \n TXT @ \"v=spf1 include:_spf...\" 3600 - Add records Copy Anchor Link \n\n Terminal Copy Text # Add an A record \n edge dns records add zone-abc123 --type A --name www --data 192.0.2.1 --ttl 300 \n \n # Add a CNAME record \n edge dns records add zone-abc123 --type CNAME --name cdn --data cdn.edge.network \n \n # Add an MX record \n edge dns records add zone-abc123 --type MX --name @ --data mail.example.com --priority 10 \n \n # Add a TXT record \n edge dns records add zone-abc123 --type TXT --name @ --data \" v=spf1 include:_spf.example.com ~all \" Geographic routing Copy Anchor Link \n\n Terminal Copy Text # Add record with geo routing \n edge dns records add zone-abc123 --type A --name @ --data 185.1.1.1 \\ \n --geo EU= 185.2.2.2 \\ \n --geo NA= 185.3.3.3 \\ \n --geo US-WEST= 185.4.4.4 \\ \n --geo GB= 185.5.5.5 \n \n # Geo codes follow this hierarchy: \n # Region: NA, EU, AS, OC, AF, ME, SA \n # Country: US, GB, DE, FR, JP, etc. (ISO 3166-1) \n # Zone: US-WEST, US-EAST, CN-NORTH, etc. Update a record Copy Anchor Link \n\n Terminal Copy Text # Update record data \n edge dns records update zone-abc123 rec-xyz789 --data 192.0.2.2 \n \n # Update TTL \n edge dns records update zone-abc123 rec-xyz789 --ttl 600 \n \n # Update multiple fields \n edge dns records update zone-abc123 rec-xyz789 --data 192.0.2.2 --ttl 600 Delete a record Copy Anchor Link \n\n Terminal Copy Text # Delete with confirmation \n edge dns records delete zone-abc123 rec-xyz789 \n \n # Delete without confirmation \n edge dns records delete zone-abc123 rec-xyz789 --yes Metrics Copy Anchor Link \n\n Output Copy Text $ edge dns metrics zone-abc123 \n Period: Last 24 hours \n \n Total Queries: 1,245,678 \n Response Time: 2.3ms avg \n \n By Record Type: \n A: 892,345 queries \n AAAA: 201,456 queries \n CNAME: 112,345 queries \n MX: 32,456 queries \n TXT: 7,076 queries \n \n By Country: \n United States: 456,789 \n United Kingdom: 234,567 \n Germany: 178,234 \n France: 89,012 \n Other: 287,076 Terminal Copy Text # Specify time period \n edge dns metrics zone-abc123 --period 7d \n \n # Filter by record type \n edge dns metrics zone-abc123 --record-type A \n \n # Export as CSV \n edge dns metrics zone-abc123 --export csv > dns-metrics.csv Supported record types Copy Anchor Link \n\n 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 Copy Anchor Link \n\n Run AI-powered analysis of your DNS configuration. It checks email deliverability, security, nameserver delegation and best practices.\n\n Terminal Copy Text # Run examination on a zone \n edge dns examine < zone-i d > \n \n # View the last examination result \n edge dns examine-last < zone-i d > \n \n # Output as JSON \n edge dns examine < zone-i d > --output json Examinations take up to 30 seconds. Results are saved and can be retrieved with examine-last .\n\n Common flags Copy Anchor Link \n\n 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\n\n Storage commands\n\n Manage buckets and objects\n\n DNS docs\n\n Full DNS documentation\n\n Something unclear or out of date? Tell us , or read this page as Markdown .\n\n CDN commands\n\n Previous\n\n Storage commands\n\n Next",
  "headings": [
    {
      "level": 1,
      "text": "DNS commands"
    },
    {
      "level": 2,
      "text": "Next steps"
    },
    {
      "level": 3,
      "text": "Storage commands"
    },
    {
      "level": 3,
      "text": "DNS docs"
    }
  ],
  "relatedLinks": [
    {
      "@type": "WebPage",
      "name": "Network",
      "url": "https://edge.network/network"
    },
    {
      "@type": "WebPage",
      "name": "Pricing",
      "url": "https://edge.network/pricing"
    },
    {
      "@type": "WebPage",
      "name": "Docs",
      "url": "https://edge.network/docs"
    },
    {
      "@type": "WebPage",
      "name": "Sign in",
      "url": "https://edge.network/console/access"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/cdn/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Deployments",
      "url": "https://edge.network/docs/cdn/deployments"
    },
    {
      "@type": "WebPage",
      "name": "Domains &amp; SSL",
      "url": "https://edge.network/docs/cdn/domains"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/compute/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Creating VMs",
      "url": "https://edge.network/docs/compute/creating-vms"
    },
    {
      "@type": "WebPage",
      "name": "Managing VMs",
      "url": "https://edge.network/docs/compute/managing-vms"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/dns/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Zone management",
      "url": "https://edge.network/docs/dns/zones"
    },
    {
      "@type": "WebPage",
      "name": "DNS records",
      "url": "https://edge.network/docs/dns/records"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/storage/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Buckets",
      "url": "https://edge.network/docs/storage/buckets"
    },
    {
      "@type": "WebPage",
      "name": "Access keys",
      "url": "https://edge.network/docs/storage/access-keys"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/shield/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget modes",
      "url": "https://edge.network/docs/shield/widget-modes"
    },
    {
      "@type": "WebPage",
      "name": "JavaScript API",
      "url": "https://edge.network/docs/shield/js-api"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/assist/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget &amp; embedding",
      "url": "https://edge.network/docs/assist/widget"
    },
    {
      "@type": "WebPage",
      "name": "Content ingestion",
      "url": "https://edge.network/docs/assist/ingestion"
    },
    {
      "@type": "WebPage",
      "name": "Authentication",
      "url": "https://edge.network/docs/api/authentication"
    },
    {
      "@type": "WebPage",
      "name": "Errors",
      "url": "https://edge.network/docs/api/errors"
    },
    {
      "@type": "WebPage",
      "name": "Versioning",
      "url": "https://edge.network/docs/api/versioning"
    },
    {
      "@type": "WebPage",
      "name": "Compute",
      "url": "https://edge.network/docs/api/compute"
    },
    {
      "@type": "WebPage",
      "name": "CDN",
      "url": "https://edge.network/docs/api/cdn"
    },
    {
      "@type": "WebPage",
      "name": "DNS",
      "url": "https://edge.network/docs/api/dns"
    },
    {
      "@type": "WebPage",
      "name": "Installation",
      "url": "https://edge.network/docs/cli/installation"
    },
    {
      "@type": "WebPage",
      "name": "Authentication",
      "url": "https://edge.network/docs/cli/authentication"
    }
  ],
  "alternateFormats": [
    {
      "@type": "MediaObject",
      "contentType": "text/html",
      "url": "https://edge.network/docs/cli/dns",
      "name": "HTML version"
    }
  ],
  "dateModified": "2026-11-23T08:56:45.497Z"
}