DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

How to list domains with their nameservers on DirectAdmin server

| 12:47:56 31.10.2022

Ever wondered on how to list all domains with their name servers? Need to transfer domains to a new server and want to check how do they resolve? OK, there is a solution. Check it now.

There is a simple script on how to get this all done, and even more.

    This is a script to list directadmin domains with a requested from
    DNS additional information.

    ./ <options>

    --domains  - just list domains without DNS queries
    --ns       - list domains with their nameservers
    --mx       - list domains with their MX records
    --ipv4     - list domains with their IPv4
    --ipv6     - list domains with their IPv6

Upload it to the server and run as root:

cd ~
wget -O
chmod 755
./ --help

List DirectAdmin domains with their nameservers

./ --ns

The command will output a list of domains with name servers, like the following:


If you want to list domains which use CloudFlare then call the command this way:

 ./ --ns | grep cloudflare

It will give the following output

- ma*****
- wa*****
I've masked my domains here. Your list might differ.

That's it. Good luck.

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.

All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition