Operating system:Ubuntu
OS version:18.04.5
Latest Webmin / Virtualmin
All packages are up-to-date
I’m in the middle of building my web hosting environment with webmin and virtualmin, but I have been halted by something.
I use a third party service provider as secondary DNS, where payment is due based on the number of DNS zones, thus I don’t want to create too many zones in my system unless it’s indeed justified, so I was really happy to see that it is possible to set in the BIND DNS domain settings among the server templates that whenever a subdomain is created, the system adds the appropriate records in the parent’s domain zone without creating an own DNS zone.
This setting works properly whenever a sub-server is established, but as for aliases whatever the setting is in the above mentioned template settings, there is always a new, separate DNS zone created. As I use quite a number of aliases, which are also subdomains (example.com -> alias.example.com), for me this solution would be rather expensive at my secondary DNS service provider. To tell the truth I don’t really understand anyway why would that be a better solution to copy the DNS zone of the parent and supplement it with the new records. This, on the one hand, seems to be unnecessary redundant, and, on the other, should there be too many subdomains, it is quite chaotic to handle that many DNS zones. And why this type of operation is more justified for a sub-server than an alias, as the alias is even closer to the parent. Not to mention that default aliases (www, mail, admin, etc.) are solved by also virtualmin by means of additional records in the parent zone. Why is it impossible to solve all the rest like this?
First I was of the opinion that this should be a bug, but having looked at the source code, it seems that the case of creating an alias was intentionally left out of this feature (see line 56 in feature-dns.pl).
Of course this limitation could be bypassed in many ways, for example the code could be patched (but I wouldn’t opt for this solution, as then it would be difficult to manage the updates), or whenever an alias is created, DNS management could be turned off, and the necessary records could be created either manually or by using an automatically running script (in my opinion the necessary records are the three A type ones: alias, www.alias, mail.alias), but here it would be important to delete the records whenever the alias is terminated. It would be much more convenient if the same could be applied here as with the sub-server, where everything is automatically created, deleted, etc… And of course, it wouldn’t be obligatory to turn on this featue in the templates, if this solution is not suitable for a user.
Is there anyone who could explaine me why the creation of aliases is intentionally excluded from this feature? Are there any serious disadvantages of adding DNS records into the parent zone, which justifies even the option of selecting the other type of operation to be excluded?
And what would you suggest? Which path shall I take if I insisted on applying the solution I described for creating alias subdomains?
I use Ubuntu 18.04.5 with the latest webmin/virtualmin, all packages are up-to-date.
Thank you very much for your reply!