This function configures the server's resolver nameservers.
Warning:
127.0.0.1
on a cPanel & WHM server.required | string or string The server's primary resolver nameserver. Example: nameserver1=192.168.0.20 |
required | string or string <ipv4> The server's secondary resolver nameserver. Example: nameserver2=192.168.0.21 |
string or string Default: "" The server's tertiary resolver nameserver. Example: nameserver3=2001:4860:4860::8888 |
HTTP Request was successful.
object |
whmapi1 --output=jsonpretty \ setresolvers \ nameserver1='192.168.0.20' \ nameserver2='192.168.0.21'
{- "metadata": {
- "command": "setresolvers",
- "output": {
- "messages": "Listed in order they are:\n192.168.0.20\n192.168.0.21\n2001:4860:4860::8888\n"
}, - "reason": "Your resolvers have been setup!",
- "result": 1,
- "version": 1
}
}