ERROR: Challenge is invalid!

My domain is: and

I ran this command: Using lets Encrypt button on forge-panel.

It produced this output:

--2020-06-15 09:28:15--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘letsencrypt_script1592213295’

     0K ..                                                     38.6M=0s

2020-06-15 09:28:15 (38.6 MB/s) - ‘letsencrypt_script1592213295’ saved [3021]

Cloning into 'letsencrypt1592213295'...
ERROR: Challenge is invalid! (returned: invalid) (result: {
  "type": "http-01",
  "status": "invalid",
  "error": {
    "type": "urn:ietf:params:acme:error:unauthorized",
    "detail": "Invalid response from []: \"\u003c!DOCTYPE html\u003e\\n\u003chtml lang=\\\"sv-SE\\\" prefix=\\\"og:\\\"\u003e\\n\u003chead\u003e\\n    \u003cmeta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edg\"",
    "status": 403
  "url": "",
  "token": "pJzbFkS-GeNIu-QwZNSjc5Pu6ExayZ6REZb1sV36-bo",
  "validationRecord": [
      "url": "",
      "hostname": "",
      "port": "80",
      "addressesResolved": [
      "addressUsed": ""

My web server is (include version): nginx

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is: glesys

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): Forge

I have also tried all of these settings, non of them work.
#location ~ /.(?!well-known).* {
# deny all;

location ~ /.well-known {
    allow all;
    auth_basic off;
#location ^~ /.well-known/acme-challenge/ {
    #allow all;
    #default_type "text/plain";
1 Like

Please, is there someone who can help. I am now trying on another site, getting the same result.

Does your script have redirections in place that will redirect all unknown pages to a 404 page?
I don’t have any experience with the software (panel) you used, so if you are using nginx and able to modify your configuration panel manually, can you try to move the well-known location block above your root and php reference? (that might help)

1 Like

Thanks, unfortunately it didn´t work.
We have generated a cert with a plugin before, I´m wondering if that´s whats causing the problem.

We have now removed all old stuff, just using http for now.
Will try obtain new certificate in an hour (too many requests for now).