# Requesting a certificate for \*\*\* from Let's Encrypt request failed

**URL:** <https://forum.virtualmin.com/t/requesting-a-certificate-for-from-lets-encrypt-request-failed/109424>\
**Category:** Help! (Home for newbies)\
**Created:** [February 16, 2021, 12:52am UTC](https://forum.virtualmin.com/t/requesting-a-certificate-for-from-lets-encrypt-request-failed/109424 "2021-02-16T00:52:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![petralian](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/petralian/32/2081_2.png) [@petralian](https://forum.virtualmin.com/u/petralian)\
**Post date:** [February 16, 2021, 12:52am UTC](https://forum.virtualmin.com/t/requesting-a-certificate-for-from-lets-encrypt-request-failed/109424/1 "2021-02-16T00:52:46Z")

</div>

**Operating system:Debian Linux 9**

Hi all, I tried to letsencrypt renew my domain and webmin server cert and I get the following error:

```
Requesting a certificate for mysite.com, www.mysite.com, jp.mysite.com from Let's Encrypt ..
.. request failed : Web-based validation failed :
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for jp.mysite.com
http-01 challenge for mysite.com
http-01 challenge for www.mysite.com
Using the webroot path /home/mysite/public_html for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. mysite.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://mysite.com/.well-known/acme-challenge/F-is3Wku7hLBMMMg_oDAAAgIZk8glDHDoSTg3XYXTAM [172.104.118.45]: "<!DOCTYPE html>\n<html class=\"avada-html-layout-wide avada-html-header-position-top\" lang=\"en-US\" prefix=\"og: http://ogp.me/ns# f"
IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: mysite.com
   Type: unauthorized
   Detail: Invalid response from
   http://mysite.com/.well-known/acme-challenge/F-is3Wku7hLBMMMg_oDAAAgIZk8glDHDoSTg3XYXTAM
   [172.104.118.45]: "<!DOCTYPE html>\n<html
   class=\"avada-html-layout-wide avada-html-header-position-top\"
   lang=\"en-US\" prefix=\"og: http://ogp.me/ns# f"

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address.

```

I actually have no idea how to fix this… any help would be much appreciated. I am using the virtualmin \> server configuration \> SSL certificate \> Let’s Encrypt tab.

My webmin and website are both using the same domain.  
Webmin = [jp.mysite.com](http://jp.mysite.com)  
Website = [www.mysite.com](http://www.mysite.com) and [mysite.com](http://mysite.com)  
FTP is encrypted but of course, this is expired also…  
DNS A redirects to the correct IP address, I do not use AAAA

- I found some help on [Let's Encrypt SSL certificate ".. request failed : Web-based validation failed : Failed to request certificate :" | Virtualmin](https://www.virtualmin.com/node/64879) but I have no idea how to apply it. How can I add ./well-known as alias per-vhost and will it fix my issue?
- I found some help on [virtualhost - Global Apache Alias, ignoring virtual hosts - Server Fault](https://serverfault.com/questions/744220/global-apache-alias-ignoring-virtual-hosts#comment1059952_744252) which looks like it deals with the same issue but I also have no idea how to apply it. I have no idea “where” I can add this alias and how to apply it.

If someone would please be so very kind to provide step by step instructions for how to do this in virtualmin/webmin, I would be very grateful.

---

<div class="post-metadata">

**Author:** ![petralian](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/petralian/32/2081_2.png) [@petralian](https://forum.virtualmin.com/u/petralian)\
**Post date:** [February 23, 2021, 7:00am UTC](https://forum.virtualmin.com/t/requesting-a-certificate-for-from-lets-encrypt-request-failed/109424/2 "2021-02-23T07:00:58Z")

</div>

bump… any replies?

---

<div class="post-metadata">

**Author:** ![ramin](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/71e660/32.png) [@ramin](https://forum.virtualmin.com/u/ramin)\
**Post date:** [February 23, 2021, 4:00pm UTC](https://forum.virtualmin.com/t/requesting-a-certificate-for-from-lets-encrypt-request-failed/109424/3 "2021-02-23T16:00:52Z")

</div>

> [@petralian](#):
>
> I actually have no idea how to fix this…

Neither do I but I’ll throw out some ideas…

> [@petralian](#):
>
> Webmin = [jp.mysite.com](http://jp.mysite.com)

Is this the server’s hostname and is there an A record for it? If you are hosting your own DNS Virtualmin takes care of essential A records when you create a virtualhost, but I don’t think Virtualmin takes a server hostname into account. If there’s a missing A record for this name add it manually to the same zone for the other names.

> [@petralian](#):
>
> I do not use AAAA

Do you mean there’s no IPv6 at all? or IPv6 is enabled for the server but you choose not to use it? If IPv6 is lurking somewhere in the network LE will find it and expect to find AAAA records. Or IPv6 doesn’t exist but there’s an entry for `::1` in _/etc/hosts_. If any of this rings a bell you’ll want to make certain IPv6 is thoroughly disabled before going without AAAA records.

Here’s a suggestion that may help with that:

> [@Error creating Certificate : address ::1 exists, but this virtual server does not have IPv6 enabled](https://forum.virtualmin.com/t/error-creating-certificate-address-1-exists-but-this-virtual-server-does-not-have-ipv6-enabled/109119/2):
>
> In Virtualmin -\> Manage Virtual Server -\> Change IP address, set IPv6 address to none and then apply again for a SSL certificate. Should work this time.

It’s hard to say why http validation fails. Sometimes LE is unable to create _.well-known/acme-challenge_. Other times there’s redirection occuring in a virtualhost config or http header in an _.htaccess_ file that gets in LE’s way. When http validation fails LE moves on to DNS validation, so I find that it’s easier to correct DNS one time rather than modify a virtualhost every time LE needs to run.

---

<div class="post-metadata">

**Author:** ![petralian](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/petralian/32/2081_2.png) [@petralian](https://forum.virtualmin.com/u/petralian)\
**Post date:** [February 26, 2021, 5:40am UTC](https://forum.virtualmin.com/t/requesting-a-certificate-for-from-lets-encrypt-request-failed/109424/4 "2021-02-26T05:40:18Z")

</div>

Oh great call out!!

I went to virtualmin \> [mysite.com](http://mysite.com) \> server configuration \> change IP address and there I chose “None” for New IPv6 address.

Now I can renew my cert! Thank you @ramin!

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [March 6, 2021, 5:40am UTC](https://forum.virtualmin.com/t/requesting-a-certificate-for-from-lets-encrypt-request-failed/109424/5 "2021-03-06T05:40:33Z")

</div>

Closed on March 6, 2021, 5:40am UTC

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.
