The dns
utility is used to manage DNS zones on domains and domain
aliases through CLI. By using this utility, you can perform the
following tasks:
- adding resource records to or deleting them from a domain’s or domain
alias’ DNS zone - enabling or disabling a local DNS service on a domain or domain alias
- setting Plesk name server as the master or slave server for a DNS
zone - assigning external master DNS servers for a DNS zone
- enabling or disabling the www-prefixed alias (in the
www.<domain name>
form) support for canonical domain names - updating the Start-of-Authority (SOA) record for a DNS zone
Usage
dns <command> [<domain_name>|<domain_alias>] [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
Example
The following command removes all pre-existing resource records from the
DNS zone on the domain example.com and adds the following two records
to the DNS zone:
-
new
MX
resource record mail3.example.com specifying domain name
mail.example.com as the mail exchanger and setting the mail
exchanger’s priority to 15 -
new
NS
resource record ns2.example.com setting domain
ns.example.com as the name serverplesk bin dns --set example.com -list "MX,mail3,mail.example.com,15;NS,ns2,ns.example.com"
…