Description

This function deletes a DNS zone.


  • 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.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/killdns?api.version=1&domain=example.com




https://hostname.example.com:2087/cpsess##########/xml-api/killdns?api.version=1&domain=example.com




whmapi1 killdns domain=example.com 



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




<result>
    <metadata>
        <version>1</version>
        <reason>Zones Removed</reason>
        <output>
            <raw>example.com =&gt; deleted from example.</raw>
        </output>
        <result>1</result>
        <command>killdns</command>
    </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample

domain

string

Required

The zone record's domain.

A valid domain name on the server.example.com

Returns

This function only returns metadata.