• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

DNS Records CLI

D

davividal

Guest
Hi all.

I've 2 doubts:

1 - is there any way to add DNS records through CLI? I've looked at /usr/local/psa/admin/bin but can't find anything helpful;

2 - I need (in fact, my boss wants) that every sub-domain has the 'www' prefix. Is there an "easy" ('lazyful') way to get it?

thanks
 
You can use DNS cli from following location /usr/local/psa/bin/dns or /usr/local/psa/bin/dns.sha

dns <command> [<domain_name>|<domain_alias>] [ <option_1> [<param>] [<option_2> [<param>]] … [<option_N> [<param>]] ]

./dns --set example.com -list "MX,mail3,mail.example.com,15;NS,ns2,ns.example.com"


--add or -a Adds a resource record to a domain's DNS zone.
--set or -s Adds specified resource records to and removes all pre-existing resource records from a domain's DNS zone. Requires the -list option.
--del or -d Deletes a resource record from a domain's DNS zone.
--del-all or -da Deletes all resource records from a domain's DNS zone.
--reset or -res Restores the default resource records for a domain's zone based on the Plesk server DNS zone template.
--on Enables DNS service on a domain or domain alias.
--off Disables DNS service on a domain or domain alias.
--set-master Sets the Plesk name server as the master server for domain's or domain alias' DNS zone.
--set-slave Sets the Plesk name server as the slave server for domain's or domain alias' DNS zone.
--help or -h Displays help on the use of the utility.
 
How to setup master's IP using CLI

Hi !,

Do you know how to setup IP address of master DNS after setting plesk as slave ?
I mean, using CLI, not GUI.
I dig forums but none ... and can't realize how to do this reading docs.

Thank you !
Jorge.
 
Back
Top