Setting up DNS nameserver does not work

OS type and version Debian 10
Virtualmin version 6.17-3.

Hello everybody,

I’m completely new to Virtualmin. In the pas I’ve hosted several website at home, but in recent years I’ve had my websites hosted at an external company. Now, I’d like to move everything to my own server.

I got most things working, but I still find myself struggling with the DNS name server. Originally, I tried to have my main domain be a website and a name server. It was not really possible to get this done, because I couldn’t get my registar to create the glue records.

Right now my situation is like this:

  • alternative domain has two records: and, both point to the same public ip
  • port 53 is forwarded (TCP and UDP) to the server
  • the hostname (and main virtual server) of there server is and has two dns a records (ns1 and ns2) pointing to the global domain, furthermore, there are two ns records pointing to and
  • virtual server template is modified to include both name servers with any new virtual server
  • there is a second virtual server with my primary domain as hostname
  • my primary domain is set at the registar to point at nameservers and

With above steps, my primary domain does not work. The DNS records in virtualmin appear to be correct, but nothing is propagated. What am I doing wrong?

If any additional info is needed, please let me know.

Ps: I love the Virtualmin software!


I offer paid support for an affordable rate, and can get all your DNS issues resolved via a screen sharing session (so you can see how it was done). My policy is simple, no solution no cost. All work is “post-paid” so you get what you require before making payment.

I don’t understand what this means or what you were trying to do.

It sounds like you still don’t have glue records, which is the one piece of the puzzle that Virtualmin cannot solve for you (your registrar manages those, presumably providing you a GUI for setting them).

Springing glue records into existence for a domain that does not yet have working name resolution can be difficult or impossible with some registrars. If they don’t let you enter IP addresses in addition to the names of the name servers, you’ll need to host your domain first on a DNS server that already has working glue records, and then once your registrar has looked up ns1.yourdomain.tld and ns2.yourdomain.tld and knows their IPs, you can change the glue records to point to your new name servers.

Hi Joe, thanks for your quick reply. I gave up on making glue records for my primary domain. Instead, I am now using another domain as top domain, which at the registar has two dns A records that point to the server ip. This domain does not need to host a website. This domain is set as hostname on the server and has a virtual server that has the name server records corresponding with those on set at the registar.

My “primary” domain, which I would like to show a website, is a second virtual server. At the registar I’ve set the nameserver to the top domain mentioned above.
The DNS records in Virtualmin are set as such that:

  • the start of domain is,, …
  • there are two name server records for and

To summarise my goal: I have a top domain that I want to function as name server for other domains that will be hosted on the server. The top domain currently has DNS configured at the registar. The domain that has to show a website, is pointed to the server, I would like virtualmin to be able to control the DNS records.

Previously, I tried to have the topdomain be hostname, nameserver and web server.

The hostname should be a subdomain like server.altdomain.tld

Then in Virtualmin, you can create a virtual server for altdomain.tld and host a website on it.

Thanks for your reply. I had that in my original setup. However, this shouldn’t affect the name server I suppose?

The essential thing is to have a subdomain as hostname, so it can be something like server.topdomain.tld in keeping with your latest example.

No, the hostname is distinct from your name servers and the choice of hostname will not effect your name servers, when you specify these in Virtualmin Post Install Wizard.

Allright, but that supposedly still doesn’t explain why my DNS name server doesn’t work for my other domain name?

No. The subdomain server hostname recommendation is to keep mail simple.

Name servers are wholly independent of your web, mail, server hostname, and everything else. I’m seeing a bunch of conversation about wholly irrelevant details here, which maybe indicates some fuzzy understanding. I’m having a hard time following what the problem is.

Forget about your websites, subdomains, and everything else.

Do your glue records work? Are you sure?

When you do whois domain.tld for the domain that is having problems, what are the name servers returned? Are they right? OK, now when you lookup the IP of those name servers, does that work?

Hi Joe, once again thank you for your reply.

My topdomain has DNS (external) records: → server ip (identical) → server ip (identical)
These records resolve and point to my server.
In virtualmin the virtual server as records for these name servers.

Then I made a second virtual server, let’s say At the registar name servers are set to and In virtualmin the dns records show that the domain starts at and All these settings are default. however, does not resolve.

I’m not confident you’ve answered my question.

When you do whois what are the name servers listed? Is it what you expect?

If this is actually your domain, here’s what I see:

$ whois
Domain nameservers:

And, when I ask for those name server IPs, I get:

$ host has address
$ host has address

And, when I ask those name servers for your domain, I get:

$ host
Using domain server:
Aliases: has address

Is all of that what you expect?

And, if this is not actually your domain, please use example.tld or some other non-existent name (in particular .tld is a non-existent .tld, so it makes it useful for example domains).

Edit: Or just give us your actual domain. I don’t know why that’d be a secret or sensitive information.

Hi Joe,

I’m sorry I’ve not made it clear. The domains mentioned were meant as an example.
The real domains are (has the registar as name server) and (has as name server).

Edit: the main virtual server on my domain is set to The dns records of this domain are:

$ttl 3600
@	IN	SOA (
			3600 )
@	IN	NS	IN	A	IN	A	IN	A	IN	A	IN	A	IN	A	IN	A	IN	A	IN	A	IN	A	IN	MX	5	IN	TXT	"v=spf1 a mx ip4: ip4: ip6:fd2a:ef3b:4c5f:4599:6ab5:99ff:fe75:ece4 ?all"

Then the records in are:

$ttl 3600
@	IN	SOA (
			3600 )
@	IN	NS	IN	A	IN	A	IN	A	IN	A	IN	A	IN	A	IN	A	IN	A	IN	MX	5	IN	TXT	"v=spf1 a mx ip4: ip4: ip6:fd2a:ef3b:4c5f:4599:6ab5:99ff:fe75:ece4 ?all"

I don’t care what the records are. The records are meaningless if the glue records and the name servers those glue records are pointing to are wrong. I’ve given examples of how to check those things above using the whois and host commands. (But, when I visit your domain, I see a Virtualmin landing page, which seems to indicate your DNS is working.)

Then again, according to whois, your name servers are:

Yes, that’s correct. As I mentioned before, the DNS of is managed by the registar. It has the records for ns1 and ns2, that are pointing to my ip. does not have the DNS managed by the registar, the nameservers of are entered and point to my server.

$ whois
Domain nameservers:      

Asking for either the domain of ns1 or ns2:

$ host has address

And finally asking for the name servers:

$ host has address mail is handled by 10 ALT4.ASPMX.L.GOOGLE.COM. mail is handled by 5 ALT1.ASPMX.L.GOOGLE.COM. mail is handled by 10 ALT3.ASPMX.L.GOOGLE.COM. mail is handled by 5 ALT2.ASPMX.L.GOOGLE.COM. mail is handled by 1 ASPMX.L.GOOGLE.COM.

So as it turns out I was wrong, DNS is now working correctly. The server manages DNS for the domain. It probably took longer to propagate somehow. One issue remains though, a website is still not shown.

Make a new topic!

Thanks for your time @Joe!

I do think I still have DNS issues, but hopefully they will be fixed by allowing more time to pass.

As stated above, when I check the DNS from my terminal it seems to work. But when I use and look for ns records, it only resolves at four different locations. When I look for A or MX records, none are resolved.

Do you think this is simply a matter of more time to get these propagated?

Edit: the records are still not resolving. I’ve switched back to the registar name servers to get my email to function again. I’ve created a new virtual server: and pointed the name servers to and
I’ll wait a couple hours and see if records propagate.

If when you check at your terminal all of those records (A/MX) works, then yes, propagation is the problem. If you’re testing what you should be testing to confirm they are all working, that is.

But, if you don’t get A records and MX records when testing at the command line, either, then something is still wrong.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.