Unexpected behaviour with cloudflare subdomains/subservers + virtualmin pro

Hello everyone, something a bit strange happened to me or at least, I can’t understand it. I have purchased a licence for virtualmin pro. I went to enter the cloudflare licence to activate it, went into dns settings → dns option and activated cloudflare support from the dropdown menu from local that was. So far so good, it’s the main virtual server. Entering the cloudflare dns page I noticed that it had transferred all the various dns records of the main server/domain but had not entered a subdomain which I manage as a sub server because I use it as a proxy. So, I thought of doing the same thing i.e. going into the dns settings. When I did this, it overwritten the dns zone of the main domain “ONLY” with the dns values for the subdomain “DELETING” the other dns references to the main domain / server. This is unexpected behaviour and I am sure I am missing something. Would someone be so kind as to kindly enlighten me? Thank you.

are you hosting a domain in virtualmin that has the same name as your system hostname ?

@Jamie, do you remember if this is something we already fixed recently but just haven’t released yet?

I don’t recall - let me see if I can reproduce this!

Ok I tested this, but wasn’t able to reproduce the issue - when moving a sub-domain to Cloudflare, all the existing parent domain records were preserved.

@bluenor Perhaps you created a subdomain as a top-level domain? Also, what are your Webmin and Virtualmin versions?

First of all, I would like to thank everyone for their quick replies. The subdomain was managed via a sub server which had been created with virtualmin gpl and was as a sub server linked to the main domain. I don’t know why you were unable to reproduce the problem, perhaps I had previously made a mistake or something was stuck. I solved it this way:

  1. I went into the dns records of sub server and deleted all the dns records.

  2. I went into the manage of the sub server and unchecked the flag on dns management.

  3. I went into the server / main domain, dns records and added the sub domain as a record.

Since it was no longer managed by the subdomain, the main type A record was updated on cloudflare correctly pointing to the proxy subdomain.

Virtualmin Virtual Servers
Version 7.30.8 Pro
Debian 12

1 Like

We have made a lot of fixes in this area that haven’t yet been released, but will be out soon. Since I was testing with our latest code, it seems likely that the issue has already been fixed.