how to add multiple domain

I have just installed virtualmin for my ubuntu server 16.04.
Assume that i have three domain which is :

  1. how to add domain to the server with ssl certificate. Are there any tutorial that is related to this?

  2. What should be my hostname of ubuntu server if i have three domain.
    I just refered to this website that the hostname must have the domain name in it.

Your server hostname could be anything, but generally is some kind of sub-domain not used by something you want to put in your virtual servers, like I have a domain that I use for my back-end stuff, like DNS servers, hosting servers, backup servers, and such that I don’t use for public websites. Domains are so cheap now. :slight_smile:

To create an SSL certificate, create the virtual server in Virtualmin, then go to Virtualmin -> select the new domain from the drop down -> Server configuration -> Manage SSL certificates. Follow your nose from there. LetsEncrypt is a popular option.

I don’t think I understand what you’re asking?

It doesn’t matter what the name of your server is, as long as it is a fully qualified domain name that will resolve at some point before you put the server into production. I can be a name within one of the domains you plan to host (but probably shouldn’t be one of the domains itself). I usually use things like “”, “” or something along those lines. But, really you can name your server literally anything you want. It just needs to be a fully qualified domain name that will resolve by the time you put the server into production. (But, again, don’t use a name you will be hosting within Virtualmin, because it’ll conflict in the Postfix virtual configuration. e.g if you’re hosting domain1.tld, don’t name your server domain1.tld, name it primary.domain1.tld or srv1.domain1.tld or c3p0.domain1.tld or whatever you want. It will be used, by default, as the first NS record and as the sending mail server name, so you may want it to be something sensible and generic.)

As for question 1, just install Virtualmin and create a new Virtual Server. It’ll be obvious how to enable SSL. You can’t miss it. It’s right on the domain creation form. It’s not complicated enough to warrant a tutorial of its own. It’s literally one checkbox on the domain creation form.

thanks for your reply.

For the hostname like you mention, do i need to buy the domain name or can i use any name?
are there any issue with mail server later?

thanks for your explanation on the hostname…

  1. are there any issue with mail server if i use any name for my hostname like “” ?

  2. yes i have tried several times before by enabling the ssl cert on creating virtual server. The problem is i cannot access my virtualmin web panel anymore after creating the virtual server with ssl cert. Are there any configuration that i have missed ?