Whilst trying to retrieve a new Let’s Encrypt certificate on a Virtualmin server, the following error was encountered:
Requesting a certificate for server_name from Let's Encrypt .. .. request failed : Web-based validation failed : Failed to request certificate : Error requesting challenges: Error creating new authz :: DNS name does not have enough labels
Resolution
The Virtualmin domain was without the TLD, so instead of saying “mydomain.com” it just had “mydomain” in Virtualmin. The solution was to add the entire domain name with the TLD.