How to reset DNS Zone of a cPanel server by CLI?

There's a regular way to reset the DNS zone of each domain name from the WHM interface. But, it is too hard to reset the DNS zone for the whole server one by one from the WHM interface. So, we recommend you run the following command to do the job easily. But. first of all, make sure "screen" is already installed on your server. If it is not installed, you can install the screen by running the command: yum install screen -y

Once, it installs on your cPanel server, start a screen (so that you won't loss the session), and run the following command:

for i in $(cat /etc/trueuserdomains | cut -d: -f1); do whmapi1 resetzone domain=$i; done
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix IP Missing issue on cPanel/WHM

We are here to help you with solving the problem of Missing IP Server in list accounts. The...

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...