How to set up Secondary DNS in DirectAdmin

Estimated reading time: 2 min


This guide will help you set up our Secondary DNS Services in your server with DirectAdmin control panel. By the end of this tutorial, you will be able to manage your DNS records via your control panel. For more information about our Secondary DNS Services please click here.


  • Installed DirectAdmin control panel
  • – Secondary DNS Services
  • This article is written for Plesk with BIND
  • You need to have the SSH login details of your server ready
  • You need to have the admin login details of your DirectAdmin Ready

Step 1 – Log in to DirectAdmin

Log in to your DirectAdmin environment

da login

Step 2 – Configure Nameservers

Open Server Manager and click on Administrator Settings.

da server manager

Open tab Server Settings and replace NS1 and NS2 with the following values and click on SAVE

da dns settings

Step 3 – Log in with SSH

You need to log in as root or a user with root privileges. You can check this article for instructions on how to log in using SSH

Step 4 – Configure BIND on the server

In order to apply the changes from DirectAdmin to the nameservers of, you need to make changes in the following configuration file /etc/named.conf.  In the configuration file find the options section which should be similar to the configuration below:

options {
	//listen-on port 53 {; };
	//listen-on-v6 port 53 { ::1; };
	directory 	"/var/named";
	dump-file 	"/var/named/data/cache_dump.db";
	statistics-file "/var/named/data/named_stats.txt";
	memstatistics-file "/var/named/data/named_mem_stats.txt";
	recursing-file  "/var/named/data/named.recursing";
	secroots-file   "/var/named/data/named.secroots";
	//allow-query     { localhost; };

	 - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
	 - If you are building a RECURSIVE (caching) DNS server, you need to enable
	 - If your recursive DNS server has a public IP address, you MUST enable access
	   control to limit queries to your legitimate users. Failing to do so will
	   cause your server to become part of large scale DNS amplification
	   attacks. Implementing BCP38 within your network would greatly
	   reduce such attack surface
	//recursion yes;

	dnssec-enable yes;
	dnssec-validation yes;

	/* Path to ISC DLV key */
	bindkeys-file "/etc/named.iscdlv.key";

	managed-keys-directory "/var/named/dynamic";

	pid-file "/run/named/";
	session-keyfile "/run/named/session.key";

Add the following lines in the options section

allow-transfer {;
notify-to-soa yes;

Save the changes and verify that there are no syntax errors in the configuration file with the following command

named-checkconf /etc/named.conf

No output means no error, otherwise, you should resolve the errors.

Step 5 – Restart the Nameserver

Go back to your DirectAdmin environment

Open Admin Tools and click on Service Monitor

da service monitor

Restart named by clicking the plus + icon on the right side and click on Restart

da named restart

Step 7 – Pre delegated domain check

In this step, we will add a domain into DirectAdmin and check the DNS configuration online. In our article we used

Add domain in DirectAdmin. Change DirectAdmin Access level from Admin to User

da access user

Click on Add New

da domain add

Fill in the domain section with the domain you want to test.

da domain

Once the domain is added, visit the website to check your DNS configuration. Add your domain in the zone.tld input field and the nameserver in our situation this is,, and Once the information is filled click Test Now.  The website will now generate a report of your DNS configuration. Your DNS configuration can be scored with three colors: GreenOrangeRed.

Green means that the DNS configuration is OK. If it’s orange or red it needs your ATTENTION!



Congratulations, you have configured our Secondary DNS Services on your DirectAdmin. You’re now able to apply the DNS changes (ADD/EDIT/DELETE) directly within your DirectAdmin without going to the control panel of the domain registrar.

Was this article helpful?
Dislike 0
Views: 7230

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *