How VirtualMin deals with sub-domains


I’m frankly not understanding some things with VirtualMin.

Let’s say that I own and that I have 3 sub-domains like so :

And that my server ip address is

The first thing that we should do is to create those domains via VirtualMin and we should finally have 3 directories /home/x/, /home/y/ and /home/z/ , isn’t it ?

How can I relate them to VirtualMin ? By creating 3 “A” records that points to ,, and in my domain provider?

Am I in the right way ?

Thank you so much for your help.


If you create the domains as virtual servers (not sub-servers), you will have: /home/x, /home/y, /home/z

If you want them to be owned by the same user, you could create them as sub-servers in Virtualmin (during creation, you can choose to create a Virtual Server, a Sub-server, or an Alias). A sub-server appears as /home/website/domains/x, /home/website/domains/y, and /home/website/domains/z

The latter is done so that the “website” user has total control over everything within his/her sub-servers.

Virtualmin does not care if a virtual server is a sub-domain or a second-level domain. They are all just names to Virtualmin (and to Apache). Only BIND has any notion of them being related to each other (based on the name alone), and Virtualmin can either create new zones in BIND for them, or add them to the existing zone (in the case of sub-servers). If Virtualmin is managing your DNS, you don’t really need to think about it…it’ll just do the right thing, assuming your glue records are right and pointing to Virtualmin managed DNS servers.

And, yes, if your DNS is managed somewhere else, you just need to add the records you want. They’d all point to the same IP. If you wanted mail to work, you’ll also need MX records.

You use virtual hosts. If you have, and they are all their own “domains” but they are all sub-domains of So, however you specify the folder locations, each will need to be in their own and can have their own unique folder OR a sub folder of the main folder. The way they are directed depends on your virtual host file so if someone types in it will be “routed” to the folder for x, will be “routed” to folder and will be “routed” to folder z. Your ‘A’ records will need to be assigned on the name server for your main ‘A’ records are what associate your domain (or sub domain) to the IP address. Who is your name server with???