DNS and Nameservers in DirectAdmin – Complete, Practical, and Professional Guide

DNS is the backbone of the internet, responsible for translating domain names into IP addresses. DirectAdmin allows you to create private nameservers (ns1/ns2), manage DNS zones, configure DNS clustering, use external DNS, and troubleshoot common issues. This guide provides a complete, clear, and practical explanation of DNS concepts and their implementation in DirectAdmin.

Nameservers in DirectAdmin

~3 min read · Updated Mar 1, 2026

1. What Is DNS and How Does It Work? (Simple Explanation)


DNS (Domain Name System) converts a domain name like domain.com into an IP address like 1.2.3.4. Without DNS, browsers wouldn’t know where websites are located.

The 3 main components of DNS:

  1. Parent Nameservers The 13 global root servers. They only store: “Which nameservers does this domain use?”
  2. Registrar The company where you purchased your domain. You tell the registrar which nameservers your domain should use (e.g., ns1.domain.com).
  3. Your own Nameservers These run on your DirectAdmin server and provide the final DNS answers.

How a DNS lookup actually works:

  1. User → ISP DNS
  2. ISP → Parent Nameservers (asks: “What are the NS for domain.com?”)
  3. Parent → returns ns1.domain.com and ns2.domain.com
  4. ISP → asks ns1/ns2: “What is the IP of www.domain.com?”
  5. Your nameserver → returns the IP
  6. ISP caches the answer for the TTL (usually 4 hours)
---

2. Creating Private Nameservers (ns1/ns2.domain.com)


Step 1: Create A records in DirectAdmin

Go to:


User Level → DNS Management → domain.com

Add two A records:


ns1    A    1.2.3.4
ns2    A    5.6.7.8

If you only have one IP, use the same IP for both.

---

Step 2: Register Glue Records at the Registrar

In the “Host Names” or “Glue Records” section:


ns1.domain.com → 1.2.3.4
ns2.domain.com → 5.6.7.8
---

Step 3: Set the Nameservers for the domain


ns1.domain.com
ns2.domain.com
---

Step 4: Wait for DNS propagation

Propagation takes 4–48 hours.

Check status:


https://intodns.com
---

3. Adding a Third Nameserver (ns3)


DirectAdmin shows only two NS fields, but you can manually add ns3.

Step 1: Customize dns_ns.conf


mkdir -p /usr/local/directadmin/data/templates/custom
cd /usr/local/directadmin/data/templates/custom
cp ../dns_ns.conf .

Add this line at the end:


ns3.host.com.=|DOMAIN|.
---

Step 2: Rewrite all DNS zones


echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d400
---

Step 3: Remove the extra line from the original template

To avoid duplication in future updates.

---

4. Using External DNS (Disabling named on DirectAdmin)


If you prefer to use Cloudflare, Route53, or any external DNS provider:

Step 1: Disable named


systemctl stop named
systemctl disable named

Step 2: Create a “placebo” named service

So DirectAdmin thinks named exists:


nano /etc/systemd/system/named.service

Content:


[Unit]
Description=Named Placebo
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/echo -n ''

Reload systemd:


systemctl daemon-reload

Step 3: Disable named in DirectAdmin


echo "named=OFF" >> /usr/local/directadmin/data/admin/services.status
---

5. DNS Clustering (Multi-Server Setup)


To create redundant DNS (recommended for production):

Step 1: Prepare two DirectAdmin servers

Server A and Server B

Step 2: Configure MultiServer Setup

On Server A:


Admin Level → MultiServer Setup

Add Server B’s IP (Zone Transfer = ON)

Repeat the same on Server B.

---

Step 3: Sync all DNS zones


echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
---

Important notes:

  • Domain Check = ON → only checks for duplicates
  • Zone Transfer = ON → full DNS sync
  • Domain Check = OFF → force sync
---

6. Final Tips & Common Troubleshooting


  • Domain already exists → zone exists in named.conf or cluster server
  • Missing Glue Record → ns1/ns2 do not resolve
  • Propagation delay → always wait 4–48 hours
  • Hide BIND version:

options { version "secret"; }

Then restart:


systemctl restart named

Written & researched by Dr. Shahin Siami

Related Articles

Email Client Configuration & Dovecot Quota/Monitoring Guide for DirectAdmin Users

This guide explains how to configure popular email clients (iPhone Mail, Thunderbird, Gmail POP/SMTP), enable Dovecot LMTP quota warnings, and check the last login time for all email accounts on a DirectAdmin server. It includes step by step instructions, recommended IMAP/SMTP settings, and useful administrative scripts.

Continue

Troubleshooting Dovecot in DirectAdmin – Fixing IMAP Errors, Authentication Issues, and SSL Certificate Checks

Dovecot is the IMAP/POP3 server used by DirectAdmin. Sometimes users encounter errors such as “Connection dropped by IMAP server” or “unknown user” during authentication. This guide explains how to fix corrupted Dovecot indexes, understand authentication logs, hide unnecessary warnings, and manually inspect SSL certificates on IMAP ports 143 and 993.

Continue

DNS Troubleshooting in DirectAdmin – When named is Running but Domains Do Not Resolve

Sometimes the named (BIND) service runs normally, yet DNS queries fail or domains do not resolve from outside. This guide provides a complete troubleshooting workflow for checking named listeners, firewall rules, named.conf configuration, DNS propagation issues, subdomain problems, resolv.conf errors, and common Apache/Nginx misconfigurations.

Continue

Managing DNS Records in DirectAdmin – Complete Practical Guide for Administrators

DirectAdmin provides a powerful DNS management system that allows administrators to control TTL values, create SRV records, enable DNSSEC, manage subdomain delegation, automate TLSA records, and perform mass DNS updates. This guide explains all essential DNS operations in DirectAdmin with real-world examples and best practices.

Continue

CustomBuild in DirectAdmin – Complete Guide to Installation, Updates, Configuration, and Advanced Customization

CustomBuild is DirectAdmin’s primary software management system. It installs, updates, configures, and rebuilds essential services such as Apache, Nginx, PHP, MariaDB/MySQL, Exim, Dovecot, FTP servers, and more. Because most components are compiled from source, CustomBuild offers exceptional flexibility, fast access to new versions, and optimized performance.

Continue

The Evolution Skin in DirectAdmin – Complete Guide, Features, Customization, and Professional Tips

Evolution is DirectAdmin’s modern, responsive, and fully JSON powered interface. It is not just a visual redesign—it introduces a new communication layer, advanced customization options, plugin friendly architecture, and a significantly improved user experience. This guide explains how Evolution works, how to enable it, how to customize it, and how to manage translations and legacy skins.

Continue