This function deletes a DNS zone record.
Warning:
Incorrect use of this function could cause domains to resolve incorrectly. Exercise extreme caution when you remove DNS zone records.
To effectively use this function, use the following workflow:
dumpzone
function.Line
value that corresponds to the zone record to delete.removezonerecord
parameters.Important:
When you disable the DNS role, the system disables this function.
line required | integer >= 1 The DNS zone record file's line number. Example: line=4 |
zone required | string <domain> The zone record's domain. Example: zone=example.com |
serialnum | string The zone file's serial number. This parameter defaults to the zone file's current serial number. Example: serialnum=2013122501 |
object |
whmapi1 --output=jsonpretty \ removezonerecord \ zone='example.com' \ line='4'
{- "metadata": {
- "command": "removezonerecord",
- "reason": "Bind reloading on hostname using rndc zone: [example.com]\n",
- "result": 1,
- "version": 1
}
}