cPanel WHM icon

cPanel WHM

Full cPanel WHM API — all 622 operations across Accounts, DNS, Mail, SSL, Backups, Databases and more

Actions262

DNS → Delete DNS zone record

AI-generated

Summary

Delete a specific DNS zone record from a given DNS zone by specifying the domain and the line number of the record to remove.

Inputs

  • Zone (required) — Specify the domain name of the DNS zone containing the record to be deleted.
  • Line (required) — Provide the line number in the DNS zone file that corresponds to the DNS zone record to be removed. Must be at least 1.
  • Serialnum — Optionally specify the zone file's serial number; if omitted, the zone file's current serial number is used.

Output shape

a JSON object containing the API's response to the delete operation, typically including success or error messages indicating the result of the removal request.

The output reflects the WHM API response for deleting a DNS zone record, including any errors encountered. The operation does not return the altered zone file itself, only the API execution result.

Examples

Example 1: Delete DNS zone record for example.com at line 5.

Set 'Zone' to 'example.com', 'Line' to 5, optionally leave 'Serialnum' empty to use current serial number.

Links

Discussion