# ERROR: Challenge is invalid!

**URL:** <https://community.letsencrypt.org/t/error-challenge-is-invalid/125841>\
**Category:** Help\
**Created:** [June 15, 2020, 9:34am UTC](https://community.letsencrypt.org/t/error-challenge-is-invalid/125841 "2020-06-15T09:34:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sofievingstedt](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/sofievingstedt/32/38034_2.png) [@sofievingstedt](https://community.letsencrypt.org/u/sofievingstedt)\
**Post date:** [June 15, 2020, 9:34am UTC](https://community.letsencrypt.org/t/error-challenge-is-invalid/125841/1 "2020-06-15T09:34:50Z")

</div>

My domain is: kalmarsundsrestauranger.se and guldfagelnarenarestaurang.se

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

It produced this output:

```auto
--2020-06-15 09:28:15-- https://forge-certificates.laravel.com/le/825943/472780?env=production
Resolving forge-certificates.laravel.com (forge-certificates.laravel.com)... 172.67.71.125, 104.26.12.100, 104.26.13.100, ...
Connecting to forge-certificates.laravel.com (forge-certificates.laravel.com)|172.67.71.125|: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 http://guldfagelnarenarestaurang.se/.well-known/acme-challenge/pJzbFkS-GeNIu-QwZNSjc5Pu6ExayZ6REZb1sV36-bo [109.74.9.92]: \"\u003c!DOCTYPE html\u003e\\n\u003chtml lang=\\\"sv-SE\\\" prefix=\\\"og: http://ogp.me/ns#\\\"\u003e\\n\u003chead\u003e\\n \u003cmeta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edg\"",
    "status": 403
  },
  "url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/5251393324/cbRrPg",
  "token": "pJzbFkS-GeNIu-QwZNSjc5Pu6ExayZ6REZb1sV36-bo",
  "validationRecord": [
    {
      "url": "http://guldfagelnarenarestaurang.se/.well-known/acme-challenge/pJzbFkS-GeNIu-QwZNSjc5Pu6ExayZ6REZb1sV36-bo",
      "hostname": "guldfagelnarenarestaurang.se",
      "port": "80",
      "addressesResolved": [
        "109.74.9.92"
      ],
      "addressUsed": "109.74.9.92"
    }
  ]
})

```

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";
#}
```

---

<div class="post-metadata">

**Author:** ![sofievingstedt](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/sofievingstedt/32/38034_2.png) [@sofievingstedt](https://community.letsencrypt.org/u/sofievingstedt)\
**Post date:** [June 17, 2020, 12:18pm UTC](https://community.letsencrypt.org/t/error-challenge-is-invalid/125841/2 "2020-06-17T12:18:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stevenzhu](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/stevenzhu/32/18864_2.png) [@stevenzhu](https://community.letsencrypt.org/u/stevenzhu)\
**Post date:** [June 17, 2020, 10:03pm UTC](https://community.letsencrypt.org/t/error-challenge-is-invalid/125841/3 "2020-06-17T22:03:30Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![sofievingstedt](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/sofievingstedt/32/38034_2.png) [@sofievingstedt](https://community.letsencrypt.org/u/sofievingstedt)\
**Post date:** [June 18, 2020, 8:50am UTC](https://community.letsencrypt.org/t/error-challenge-is-invalid/125841/4 "2020-06-18T08:50:31Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [July 18, 2020, 8:54am UTC](https://community.letsencrypt.org/t/error-challenge-is-invalid/125841/5 "2020-07-18T08:54:44Z")

</div>

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