This function adds a DNS zone record.

  • To add a reverse DNS zone record, read our addzonerecord (Reverse DNS) documentation.
  • When you call this function, you must include the additional parameters for the selected zone record type. 


whmapi1 addzonerecord class=IN ttl=86400 type=A address=

  "metadata": {
    "version": 1,
    "reason": "Bind reloading on username using rndc zone: []\n",
    "result": 1,
    "command": "addzonerecord"

            Bind reloading on username using rndc zone: []


ParameterTypeDescriptionPossible valuesExample




The new zone record's domain.

A valid domain name on the


The record's name.

A valid domain name or hostname.

Do not omit any necessary trailing periods.


The record's class.

  • IN
  • Very rarely, another valid DNS record class.


The record's Time To Live (TTL).

This parameter's value defaults to 86400.

A positive integer that represents the TTL, in seconds.



The DNS record type.

The DNS record type determines the additional DNS zone record parameters that you must include.

  • AA records store IPv4 addresses.
  • A6A6 records store IPv6 addresses.

    A6 records are deprecated . We strongly recommend that you use AAAA records to store IPv6 addresses.  

  • AAAAAAAA records store IPv6 addresses.
  • ASFDBASFDB records store the location of an AFS cell's database servers.
  • CAA CAA records   control which certificate authorities can issue SSL certificates for a domain.

    We added this DNS record type in cPanel & WHM version 66.

  • CNAMECNAME records create an alias to another hostname.
  • DNAMEDNAME records create an alias for a hostname and its subnames.
  • DSDS records specify a record's delegation signer.
  • HINFOHINFO records specify a host's CPU and OS types.
  • LOCLOC records store a hostname's geographical location.
  • MXMX records point a domain name to its MTAs.
  • NSNS records store a domain's authoritative nameservers.
  • PTRPTR records point to a CNAME.
  • RPRP records store a domain's Responsible Person's information.
  • SOASOA records designate the beginning of a zone of authority.
  • SRVSRV records store the service location records for newer protocols (for example, Autodiscover).
  • SSHFPSSHFP records store a domain's SSH public host key's fingerprint.

    We do not currently support this DNS record type. 

  • TXTTXT records store descriptive text or useful records (for example, SPF or DKIM records).


This function only returns metadata.