You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

Child pages
  • WHM API 1 Functions - set_nsec3_for_domains
Skip to end of metadata
Go to start of metadata

Description

This function configures the domain to use Next Secure Record 3 (NSEC3) semantics.

Note:

Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn't use PowerDNS, you will receive an error.


Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/set_nsec3_for_domains?api.version=1&domain=example.com&use_nsec3=1&nsec3_opt_out=0&nsec3_iterations=7&nsec3_narrow=1&nsec3_salt=1a2b3c4d5e6f
 Command Line
whmapi1 set_nsec3_for_domains domain=example.com use_nsec3=1 nsec3_opt_out=0 nsec3_iterations=7 nsec3_narrow=1 nsec3_salt=1a2b3c4d5e6f


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
   "data":{
      "domains":[
         {
            "domain":"example.com",
            "enabled":1
         }
      ]
   },
   "metadata":{
      "version":1,
      "reason":"OK",
      "command":"set_nsec3_for_domains",
      "result":1
   }
}


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The domain for which to enable NSEC3 semantics.

A valid domain.example.com
nsec3_opt_outBoolean

Required

Whether the system will create records for all delegations.

  • 1 — Create records for all delegations.

    Note:

    Only select this option if you must create records for all delegations

  • 0 — Create records only for secure delegations.
0
nsec3_iterationsinteger

Required

The number of times that the system re-executes the first resource record hash operation.

A positive integer less than 501.7
nsec3_narrowBoolean

Required

Whether NSEC3 will operate in Narrow mode or Inclusive mode.

Note:

For information about these modes, read PowerDNS's DNSSEC documentation.

  • 1 — Narrow mode.
  • 0 — Inclusive mode.
1
nsec3_saltstring

Required

The salt value that PowerDNS uses in the hashes.

Note:

For information about salt values, read RFC 5155.



A hexadecimal string.1a2b3c4d5e6f

Returns

ReturnTypeDescriptionPossible valuesExample
domainsarray of hashesAn array of hashes that contains information about each domain.Each hash contains the domainenabled, and error returns.

domain

string

The domain for which the system enabled NSEC3.

The function returns this value in the domains hash.

A valid domain.example.com

enabled

Boolean

Whether the system enabled NSEC3.

The function returns this value in the domains hash.

  • 1 — Enabled.
  • 0 — The system failed to enable NSEC3.
1

error 

string

An error message that describes why the system could not enable NSEC3.

Note:

The function only displays this return when the enabled return is a 0 value.

The function returns this value in the domains hash.

An error message.Error message.