How to update all DNS records in DirectAdmin

Modified on Wed, 13 Oct 2021 at 08:54 PM

There can be multiple reasons why you want to update the DNS records of every domain at once. This is only possible to do when you have direct SSH access to the server. If you do not you can ask us (your server administrator) to run the commands. Do note that these commands can only be run for all domains on the server and all domains of one account. Furthermore, this is only possible on your own server or a server that is managed by

DirectAdmin mass update DNS server

In this example we assume that you want to replace the old name server with the new one: And with Replace the nameservers with yours and run the following commands:

# Reconfigure the settings in DirectAdmin for new domains
cd /usr/local/directadmin/data/users
perl -pi -e 's/' */user.conf
perl -pi -e 's/' */user.conf
perl -pi -e 's/' */reseller.conf
perl -pi -e 's/' */reseller.conf

# Reconfigure existing DNS entries. Change directory to the location of the DNS files.
cd /var/named
perl -pi -e 's/' *.db
perl -pi -e 's/' *.db

# Make sure that DirectAdmin generates a new serial for every domain.
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue

Do you want to update the SPF settings? Use our knowledgebase article DirectAdmin mass add IP of setting to SPF record.

Source: DirectAdmin: How to use perl to do a mass dns update

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article