cPanel WHM icon

cPanel WHM

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

Actions262

DNS → Create DNS zone

AI-generated

Summary

Create a new DNS zone on the cPanel WHM server by specifying a domain and its IP address, optionally including IPv6, zone template, and owner information.

Inputs

  • Domain (required) — The domain name for the new DNS zone.
  • Ip (required) — The IPv4 address associated with the domain.
  • Ipv6 — The IPv6 address for the domain (optional).
  • Template — The zone file template to use; can be 'standard', 'simple', 'standardvirtualftp', or a custom template file name.
  • Trueowner — The owner of the new DNS zone; defaults to the currently authenticated user if not specified.

Output shape

a single JSON object containing the response from the WHM API indicating the success or failure of the DNS zone creation.

The output includes the WHM API response parsed for errors; errors are surfaced if the creation fails. No pagination or multiple items returned.

Examples

Example 1: Create a DNS zone for example.com with IPv4 and optional IPv6 address

Set Domain to 'example.com', IP to '192.0.2.1', and optionally specify IPv6 and template fields.

Links

Discussion