Can't get subdomains to work on Google Compute Engine

Hello folks,

so I’m having a little bit of a problem here.

First, a little bit of info:

Network information: - the main domain registered at - the IP address of GCE instance.

System information:
OS: Ubuntu 16.04 LTS
Google Compute Engine

What I’m trying to do here is to host a Virtualmin server for a freelance hosting. The problem is with the DNS I suppose.

At first, I’ve configured the GCE DNS Zone as specified below: A 300 A 300 NS 21600 SOA 21600 1 21600 3600 259200 300

On the side of my domain registrar, I’ve pointed to:

So, for example, right now if I want to access root directory which is, it works just fine.

The tricky part begins when I’m adding a subserver to the root, for example It just doesn’t work.

Later on I found a workaround for that. In the GCE DNS Zone, I’ve configured a wildcard A record for the * domain pointing to

* A 300

…so in the end I’ve got all the existing subdomains to work. But, in that case, if I’ll type anything, for example, Apache will redirect me to the first working vhost (which is fine for Apache, I know that, so I’ve created 404 page for a root domain).

But the problem is that I can’t delegate any external domain name on

In the Virtualmin’s DNS record zone for there are and entries, but when I’m pointing my test domain, for example, to and, it returns NXDOMAIN.

I’m getting sick of this and I’m begging you guys for help.

Best regards,