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.

DNS Troubleshooting

~3 min read · Updated Mar 1, 2026

1. named Is Running but No One Can Query It


This is the most common DNS issue: named is active, but external DNS queries fail.

Step 1: Check if named is listening on all IPs


netstat -lnp | grep named

Or for IPv6:


ss -lnp | grep :53

You should see something like:


tcp LISTEN 0 128 0.0.0.0:53 0.0.0.0:* users:(("named",pid=1234))
udp UNCONN 0 0 0.0.0.0:53 0.0.0.0:* users:(("named",pid=1234))

If you only see 127.0.0.1:53 or ::1:53 → named is listening only on localhost.

---

Step 2: Fix /etc/named.conf

These lines should NOT exist (or must be commented):


listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
allow-query { localhost; };

Replace with:


listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
allow-query { any; };
allow-recursion { localhost; localnets; };

Restart named:


systemctl restart named
---

Step 3: Check firewall (port 53 TCP + UDP)

Test from inside the server:


dig google.com @127.0.0.1

If this works but external queries fail → firewall is blocking port 53.

Temporarily disable firewall for testing:

firewalld:


systemctl stop firewalld

iptables:


service iptables stop

CSF:


csf -x

If DNS works after disabling firewall → open port 53:


firewall-cmd --permanent --add-port=53/tcp
firewall-cmd --permanent --add-port=53/udp
firewall-cmd --reload
---

Step 4: Test from outside

Best tool:


https://www.intodns.com

Or manual test:


dig domain.com @YOUR_SERVER_IP
---

2. www.domain.com Does Not Work but domain.com Works


This is almost always a DNS propagation issue.

Fix:

  • Wait 4–24 hours
  • Before major IP changes, reduce TTL to 300–600 seconds
  • Check global propagation:

https://www.whatsmydns.net
---

3. sub.domain.com Does Not Work but domain.com/sub Works


Checklist:

  • Does an A record exist for the subdomain?
  • Test from inside the server:

dig sub.domain.com @127.0.0.1
  • If it does not resolve → named or task.queue is not working
  • If it resolves but the website does not load:

Check VirtualHost:

  • DNS IP must match the VirtualHost IP in Apache/Nginx
  • DocumentRoot must be correct (Sub-Domains Setup → Document Root Override)

If using external DNS:

Add the A record manually in the external DNS provider.

---

4. Check resolv.conf and Local DNS Servers


If the server itself cannot resolve domains, check:


/etc/resolv.conf

Correct example:


nameserver 8.8.8.8
nameserver 8.8.4.4

Test:


dig google.com @8.8.8.8
---

5. Why Do I See “Apache is functioning normally” or “This IP is shared”?


Main reasons:

  • The domain resolves to the wrong IP
  • No VirtualHost exists for the domain

Quick checks:

Check DNS IP:


dig domain.com

Check DirectAdmin IP assignment:


Admin Level → Show All Users → Domain → Assigned IP

If they do not match → fix the A record or wait for propagation.

Rebuild webserver configs:


cd /usr/local/directadmin/custombuild
./build rewrite_confs

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

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

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.

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