cPanel WHM icon

cPanel WHM

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

Actions262

DNS → Update default nameservers

AI-generated

Summary

Update the default nameservers in the WHM server's wwwacct.conf configuration by specifying up to four new nameserver entries.

Inputs

  • Nameserver — The primary nameserver to set in the NS setting of the wwwacct.conf file. If not supplied, this setting is not updated.
  • Nameserver2 — The secondary nameserver to set in the NS2 setting. Optional; if not supplied, the setting is not updated.
  • Nameserver3 — The tertiary nameserver to set in the NS3 setting. Optional; if not supplied, the setting is not updated.
  • Nameserver4 — The quaternary nameserver to set in the NS4 setting. Optional; if not supplied, the setting is not updated.

Output shape

a single JSON object containing the WHM API response indicating success or failure of the update operation.

The output includes the response from the WHM API call to update the default nameservers. If a nameserver parameter is omitted, the corresponding setting in wwwacct.conf remains unchanged. Errors are returned as part of the API response object.

Examples

Example 1: Updating primary and secondary default nameservers only

Set 'Nameserver' to 'ns1.example.com' and 'Nameserver2' to 'ns2.example.com', leaving other fields unset to keep current values.

Links

Discussion