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.

Authorizations:
query Parameters
domain
required
string <domain>

The zone record's domain.

Example: domain=example.com

Responses

Response Schema: application/json
object

Request samples

whmapi1 --output=jsonpretty \
  killdns \
  domain='example.com'

Response samples

Content type
application/json
{
  • "metadata": {
    • "command": "killdns",
    • "output": {
      • "raw": "example.com => deleted from example."
      },
    • "reason": "Zones Removed",
    • "result": 1,
    • "version": 1
    }
}