.. request failed : Web-based validation failed : Failed to request certificate

Good morning all !

I’m facing a little problem with Let’s Encrypt, I had never had this problem before with other areas …
Here is the problem :

I have no idea where the problem is coming from or how

thank you so much


I can’t find a solution

Create the file manually and see if that gets a cert?

What should I create as a file?

The 1st image you posted. In there it talks about a missing file in a location along the lines of

.well-known/acme-challenge/and a very long gibberish string

Just create a blank file in that location and with a name that’s a long string of gibberish.

Seriously read the image you posted - the error is blatant. It’s talking about a missing file it could not download. So try creating it and see what happens.



I cannot promise my solutions will work, but I’ve been confronted to it a few times, and 2 of those cases returned an error like yours.

  • Easiest case: an evil .htaccess that, for some unplanned reason, forbids web access to the path in which the system has briefly stored the temporary file that letsencrypt is seeking.
    Solution: replace the .htaccess at the site’s root with a blank file (maybe wait a while, I do not know if htaccess contents are cached or immediately refreshed in the server’s internals.)

  • Complicated case: cloudflare interference. If you’re using cloudflare, needless to mention. I had it once, SSL didn’t work anymore because the certificate expired, however cloudflare didn’t care and was still forcing http://path/file requests to be transformed in https://path/file requests, thus making the requests fail every time.
    Solution: in the cloudflare panel for that website, entirely disable SSL options, and re-run the certificate creation in virtualmin. Remember to tell come back again to tell cloudflare to use SSL afterwards.

@Dibs I created folder and file, always the same problem …

@OliverF I tried an empty htaccess, same problem …
I don’t use cloudflare

I assume you can browse to the file?

Assuming so - does your domain resolve to your VPS\IP?

Because of you can browse to it, so should LE be able to - i.e. no permissions issues. LE might not be able to resolve your domain tho.

Check your DNS settings for your domain.



Creating the file is not supposed to fix the problem. It is supposed to allow you to test what the cause of the problem is.

I realize that after manually creating the folder and the empty file, When I click on “Request Certificate”, an .htaccess file is created in the folder and the empty file is no longer empty … there are characters and numbers inside the file

@Solodown - I just had the same error on my new VPS.

I tried a few things and all of them led to the same error. I know there’s no issues with DNS resolving.

For me the issue was with getting an SSL cert for the host domain - i.e… the master domain.

I created the empty file at the location …/.well-known/acme-challenge/longStringName file and still got the same error. So I pasted the full URL into a browser. I got nothing.

At this point - I checked what the default website was for the host. It wasn’t what I was expecting. As soon as I set that correctly - the url in the browser displayed the jibberish that was in the file.

Requesting a cert then worked.

In a nutshell (for me) it isn’t that the file is there. It’s that you can put the URL to it in a browser and see the jibberish that should be displayed.



The problem came from the configuration of the DNS … I put back my old configuration (the basic configuration generated by virtualmin), it works …