Primary nameserver cannot be resolved from the rest of the Internet : Host not found: 2(SERVFAIL)

I know this is idiotic, but could someone help me getting my domain, eg, to work with virtualmin? Eg, I would like to be able to access virtualmin from

During the Post Installation Wizard, I got this error (I was using my IP for interface):
“Primary nameserver cannot be resolved from the rest of the Internet : Host not found: 2(SERVFAIL)”

My VPS system is Ubuntu 18.04 LTS on digitalocean vps.
My hostname name is

My /etc/hosts are: localhost test

Inside DigitalOcean my is set as follows:
A directs to 3600
CNAME is an alias of 1800
NS directs to 1800
NS directs to 1800
NS directs to 1800

What do I need to set in Virtualmin and my DigitalOcean DNS to make it work?

Did you read their docs on what records to create? -

thanks for replying. Yes, I followed that page and my dns above is set up accordingly, or at least, to the best of my knowledge. I can access, but not or I did set up an additional A record last night for

I can access the IP address, but not the domain, and the mailserver is not working because test.example is not resolved.

You have an A record for the root domain, i.e., you also have a CNAME for www but you appear to not have a CNAME for test nor a wildcard entry to catch all other subdomains. In which case trying to access is as likely to succeed as trying to access

EDIT: test can be resolved in a few different ways: as a CNAME or an A record (if it’s for mail, maybe best to use an A record), or technically you could use a wildcard. As you added an A record last night - it can take up to 48hrs to propagate.

Hi Dibs, this is perfect, I will wait for propagation. In this case would adding a cname for cause conflicts (now that I already have an A record)? thank you again for your time.

If you have an A record for test, don’t bother adding a CNAME as well.

EDIT: you can use websites like to check propagation. You’d need to enter in and see where it’s got to. You can also use commands (on windows) like nsloopkup and tell it to use a specific DNS server’s IP address to do the resolution.

Thanks for your help, and the website is really useful.