title: SSL Certificate on virtualmin development domain
body: <p>SYSTEM INFORMATION</p>
  <p>OS type and version Ubuntu 20.04.3 LTS</p>
  <p>Virtualmin version  6.2.2</p>
  <p>I have a webmin with hostname virtualmin.xxx.com which is being used for development.</p>
  <p>Then I have 2 virtual servers: one called virtualmin and the other xxx.domain.com. Both are used for development.</p>
  <p>xxx.domain.com is set to Default Website for IP address. So as things are when I write the domain xxx.domain.com it is changed to virtualmin.xxx.com automatically.</p>
  <p>I would like to change xxx.domain.com to <a href="https://xxx.domain.com" rel="nofollow noreferrer">https://xxx.domain.com</a> but when I go to Server Configuration - SSL Certificate - Let’s Encrypt and enter my domain I get the following error:</p>
  <pre><code> Web-based validation failed
  
  Obtaining a new certificate
  Performing the following challenges:
  http-01 challenge for xxx.domain.com
  http-01 challenge for www.xxx.domain.com
  Using the webroot path /home/xxx/public_html for all unmatched domains.
  Waiting for verification...
  Challenge failed for domain www.xxx.domain.com
  http-01 challenge for www.xxx.domain.com
  Cleaning up challenges
  Some challenges have failed.
  IMPORTANT NOTES:
   - The following errors were reported by the server:
  
     Domain: www.xxx.domain.com
     Type:   dns
     Detail: DNS problem: NXDOMAIN looking up A for
     www.xxx.domain.com - check that a DNS record exists for this
     domain; DNS problem: NXDOMAIN looking up AAAA for
     www.xxx.domain.com - check that a DNS record exists for this
     domain
  
     DNS-based validation failed
  
  Saving debug log to /var/log/letsencrypt/letsencrypt.log
  Plugins selected: Authenticator manual, Installer None
  Obtaining a new certificate
  Performing the following challenges:
  dns-01 challenge for www.xxx.domain.com
  Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
  Waiting for verification...
  Challenge failed for domain www.xxx.domain.com
  dns-01 challenge for www.xxx.domain.com
  Cleaning up challenges
  Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
  Some challenges have failed.
  IMPORTANT NOTES:
   - The following errors were reported by the server:
  
     Domain: www.xxx.domain.com
     Type:   dns
     Detail: DNS problem: NXDOMAIN looking up TXT for
     _acme-challenge.www.xxx.domain.com - check that a DNS record
     exists for this domain
  </code></pre>