How to enable DNS service for all domains registered in Plesk?

Created:

2016-11-16 12:55:10 UTC

Modified:

2017-08-16 15:52:19 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to enable DNS service for all domains registered in Plesk?

Applicable to:

  • Plesk 10.x for Linux

Symptoms

DNS is switched off for a lot of domains in Plesk. How to enable DNS service for all domains registered in Plesk without manual actions for each domain?

Resolution

This can be performed by the following script:

Before executing the script please create Plesk Panel database backup:

    mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > /root/psa_`date +%F`.sql

Script content:

    mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -Ns -e"SELECT name FROM dns_zone" | while read dz ; do /usr/local/psa/bin/dns --on $dz ; done
Have more questions? Submit a request
Please sign in to leave a comment.