Start a conversation

How to update all DNS records in DirectAdmin

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

Choose files or drag and drop files
Was this article helpful?
  1. Daniel

  2. Posted
  3. Updated