I have a TLD plus an number of other TLD’s which point to the main TLD and set up as aliases. Creating the cert works fine and also re-directs to the main domain if you just enter www.TLD2.com or TLD2.com However if you use https://www.TLD2.com or https://TLD2.com it doesn’t work as it defaults to the site set up as the servers default main server.
If on the other hand I set up the additional domains as sub servers and then a website re-direct it works fine. The problem with this is that now the cert won’t renew as it throws errors as it says it receives an invalid response from the sub servers acme-challange.
The site is Wordpress
Virtualmin / Webmin