latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

DNS
DNS Zones

Delete DNS zone

This function deletes a DNS zone.

Important:

  • The WHM API 1 adddns function adds an XDNS entry for a domain in the following locations:
  • The /var/cpanel/users/USER file, where USER represents the domain's owner.
  • The /etc/vdomainaliases/DOMAIN directory, where DOMAIN represents the new zone's domain.
  • The /etc/vfilters/DOMAIN directory, where DOMAIN represents the new zone's domain.
  • This function does not automatically delete these entries. You must manually delete these entries, or you cannot use this domain as a value in other API functions.
  • You cannot delete other DNS zones that reside on Write-only servers in a DNS cluster.

Important:

When you disable the DNS role, the system disables this function.

NOTE:

You cannot use this function to delete temporary domains.

get/killdns

Query parameters

domainstring domain required
Example:example.com

The zone record's domain.

Response

HTTP Request was successful.

Example response

{
  "metadata": {
    "command": "killdns",
    "output": {
      "raw": "example.com => deleted from example."
    },
    "reason": "Zones Removed",
    "result": 1,
    "version": 1
  }
}