SYSTEM INFORMATION | |
---|---|
OS type and version | Ubuntu 20.04 |
Virtualmin version | 7.10 |
Hi. I have TLD ( someolddomain dotcom ) registered though my old hosting company, currently in the admin for that domain there are 2 DNS entries, that resolve to a cPanel account I plan to move to a VPS hosted Webmin instance. I have done the VPS / Webmin install / setup part, and I have created a Virtualmin virtual server using the TLD I referred to before. I get that I can create a custom DNS server using someolddomain dotcom , and then use something like dns1 .someolddomain dotcom and dns2 .someolddomain dotcom for any / all of the domains hosted on that Virtual server.
The part I am missing, is how does someolddomain dotcom resolve through the VPS to my Virtualmin installation? Do I delete the existing DNS records ( NS1. myoldhosting.com, NS2. myoldhosting ) and just add a single A record pointing to the host VPS? Can I use someolddomain dotcom as the primary domain for the Virtual server AND the DNS? Or do I need a second domain? Thanks in advance.
Have a look here
If you have custom nameserver per docs, and want to use Virtualmin DNS then edit he custom dns to point to the IP of the Virtualmin server.
You have a domain registrar. You have an old hosting service. You have not specified if you have your Virtualmin server with a new hosting service. I will assume you have Virtualmin installed on a new server with a new IP address. So you have a new hosting service, in addition to an old hosting service and a domain registrar.
You need to communicate with your domain registrar and tell them to change or add the glue records of your domain to the IP address of your new hosting company. In effect, you are instructing your domain registrar to add or change ns1 and ns2 to your new IP address - the IP address on which Virtualmin is installed.
I am further assuming that you have specified as Virtualmin’s hostname host.simeolddomain.tld and nameservers ns1 and ns2 in the post install wizard of Virtualmin when you installed it. If not, you should run the post install wizard again and specify the correct name servers there.
That’s all to it, I think. Wait for the changes to DNS to propagate and then create a virtual server in Virtualmin for someolddomsin.tld.
Thanks for the reply. I was using that guide. It says nothing about the primary domain name ( in my case, someolddomain dotcom ). That is where I am stuck.
Thanks for the reply. I can do anything I like with “someolddomain” I like, the question is, what? Can it be the same domain I use to prefix the name server(s), or not? Do I just point the “A” record at the VPS’s IP… or is there a better way?
At the registrar you decide to use their nameservers or point nameservers to your IP. This is set at the registrar.
If you use registrar nameservers you have to create all DNS records with them. If you do this you have to tell Virtualmin it is not handling DNS by going to System Settings > Features and Plugins > uncheck DNS domain. You can then go to DNS Records while on any server and get all the suggested records to put in your external DNS provider.
For Virtualmin to handle DNS: At your registrar you create and point your nameservers to your IP. After following the Virtualmin instructions for Setting up nameservers in Virtualmin and propagation has taken place it’s my understanding virtualmin will create all records used by the servers you create.
NOTE:
I set DNS at my registrar so if this is incorrect or incomplete about Virtualmin handling DNS someone please step in.
Yes, that’d be a single “A” record for every domain I have hosted on the Virtual server, and I know that would work… but I’d prefer to be able to use a primary and secondary DNS for any domain hosted on the Virtual server. That’s the part I can’t wrap my head around.
In my mind, the virtual server (or the host VPS) has a DNS server running that points to the Virtual server’s IP. That DNS server propagates a primary and secondary DNS, like ns1 dot myhost and ns2 dot myhost. Any domain hosted under the Virtual server can then use those DNS servers, by setting them at their respective registrar under “custom DNS”. So, for example, customerdomain5 dot com registered at GoDaddy uses ns1 dot myhost and ns2 dot myhost for it’s custom DNS. I get that.
It’s what I need to do to make the top level domain, myhost dot com work that way I don’t get. Maybe I’m overcomplicating it… I should just give it a single “A” record (with the registrar) that points to the VPS’s single public IP address.
My server is personal use and I lease all of the domains I have servers for. They are all at one registrar in my name. I ditched GoDaddy years ago. I use their nameservers because I trust them and they are all on different IPs so that provides primary and secondary DNS.
To use Virtualmin managed DNS on one server even though you create ns1 dot myhost and ns2 dot myhost they are on the same IP. Many here say that is no problem and that is what they do. I think any customer controlled domain will still have to choose nameservers and point to IP at their registrar. Then you will have to bind their domain to your ns1 dot myhost and ns2 dot myhost Which I do not have any experience with.
Maybe someone that does more what you want to do will chime in.
Now it’s just repeatedly closing the connection and failing. I’ve barely done anything apart from creating one virtual server and one virtual host. I’m not sure Virtualmin is for me, TBPH. I’d rather bail now for another option before I commit to moving a load of domains and websites off of cPanel. Thanks for the replies, anyway.
If you have the glue records set up correctly at the domain registrar and have waited long enough for these to propagate, then during Virtualmin automated install:
- specify a hostname such as host.someolddomain.tld or vps.someolddomain.tld or vps01.someolddomain.tld (but NOT someolddomain.tld or www.someolddomain.tld or mail.someolddomain.tld)
- specify the same nameservers for which you have glue records already set up at the domain registrar
You do not need to point the “A” records of someolddomain.tld to VPS’s IP. Virtualmin DNS will do it for you when you create a virtual server for the domain someoledomain.tld.
This is the best way.
You will have to do no DNS records management manually because Virtualmin will do everything for you automatically. And adding a domain for hosting on the Virtualmin server will be as simple as:
- point the DNS of the domain you want to host to Virtualmin’s DNS (that is ns1.someolddomain.tld and ns2)
- create a virtual server in Virtualmin for the domain you want to host on Virtualmin
Everything else is done for you automatically by Virtualmin. For example, if you ever disable or enable features for the domain in the Virtualmin gui, the DNS records for the domain are updated accordingly by Virtualmin.
Everything is managed automatically. This is the best way. Much better than managing DNS manually at the control panel of the domain registrar.
Glue records. You missed that.
The domain registrar must set up glue records (or offer a web interface through which these can be set up). This is necessary. Without glue records in place, none of the rest of it will work. Just pointing IPs to nameservers without glue records will not work because most domain registrars will not let you specify such nameservers for the domains that you or your clients have registered through them.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.