How can I use a domain instead of the IP for Virtualmin?

4 posts / 0 new
Last post
#1 Fri, 04/19/2019 - 03:11

How can I use a domain instead of the IP for Virtualmin?

Hi! How can I use a domain instead of the IP for Virtualmin? Like Regards Anders

Sun, 04/21/2019 - 03:19

First you need to register the domain name ""

Then, in virtualmin, set the hostname.fqdn of your server (can also be done from the command shell). Something like

where hostname = server1
fqdn =

Just to reinforce hostname.fqdn =

There are two things that need editing for your server hostname... 1. hostname 2. hosts file

They have slightly different some google searching on this (there are quite a lot of variations in standards for this, so be prepared for some confusion).

Personally, one good resource for help on this is

They have some great tutorials on this kind of thing. Ensure that you also read the comments below any tutorials as these ask questions and have resolutions to problems you will most likely encounter when trying to set this up.

Now go to back to your domain registrar>zone file records...

Add an "A" record with the IP address of your virtualmin server. A <123.456.789.12>

This will link the domain name with your virtualmin web server.

Next, ensure that you have TCP port 10000 open on both your VPS network and virtualmin server (the virtualmin server should sort itself when you install virtualmin, however, whilst usually your VPS network provider has all ports open...custom ports such as port 10000 wont be. My assumption is that if you are already able to access your virtualmin server via https://:10000 you have already sorted ports.

Once the zone file records have propogated across the internet, you will then be able to reach your virtualmin server via

To check your dns propogation...use (dns lookup)

Note some ISP's take longer than others to update their own just because mxtoolbox says it has propogated, your ISP may not have. So you might still have to wait a couple of hours.

Finally, you do not need to use BIND on your system or setup your own nameservers at all.

For all domain websites on your virtualmin server, just point A records at your virtualmin external ip address from any domains registrar and your server will sort the rest out.

Having said that, dont delete BIND...just leave all Virtualmin defaults as they are (you will have far less trouble down the track if you dont play around with Virtualmin auto install defaults unless someone very experienced in Virtualmin tells you too.)

Oh i almost forgot...its best to not use your domain ( as your primary website on this virtualmin system, when it is also being used as the hostname.fqdn ( . Whilst i have mine setup this way, it does cause me some annoying problems!

hope this helps

If you need any further help, feel free to ask more questions and i will help where i can.

Note i am in Sydney Australia, so obviously consider my time zone when waiting for a reply.

kind regards Adam

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

Sun, 04/21/2019 - 07:26

Hi. I have an domain that I intend to use as it is for the webmin. I have both registrar and dns with Cloudflare so I think it will propagate quickly. But when I test it just say connecting and nothing happens. Do I need to create a virtual server for this domain?

Anders Yuran

Sun, 04/21/2019 - 13:31

You don't need a Virtual Server added into Webmin/Virtualmin in order to use that to connect to the Webmin port.

So long as the domain resolves to the correct port, that should work with no problem.

If you're receiving a timeout when accessing it by domain name, but it works when accessing it by IP address -- that starts to sound like the IP address associated with the domain may not be correct (or the old IP may still be cached).


Topic locked