This function creates a DNS zone. If trueowner=user
, this function does the following:
/var/cpanel/users/USER
file, where USER
represents the trueowner
parameter's value./etc/vdomainaliases/DOMAIN
file, where DOMAIN
represents the new zone's domain./etc/vfilters/DOMAIN
file, where DOMAIN
represents the new zone's domain.When you call this function, the system uses the domain name and IP address that you supply. WHM's standard zone template determines all other zone information.
This function generates the DNS zone's MX record, domain PTR, and A records automatically.
Important:
When you disable the DNS role, the system disables this function.
HTTP Request was successful.
object |
whmapi1 --output=jsonpretty \ adddns \ domain='example.com' \ trueowner='user' \ ip='192.168.0.20'
{- "metadata": {
- "command": "adddns",
- "reason": "Added example.com ok belonging to user user",
- "result": 1,
- "version": 1
}
}