Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

UsmanBasharmal's avatar

Laravel Forge Can't get Let's Encrypt SSL Certificate: 403/404 Error

I am trying to setup forge with my domain and my vps hosted at another hosting than supported. Everything’s working great, except for the SSL certificate. It’s pretty much a fresh installation of Laravel; but this is the error I get:

--2020-05-28 14:02:26--  https://forge-certificates.laravel.com/le/808859/1049105?env=production
Resolving forge-certificates.laravel.com (forge-certificates.laravel.com)... 104.26.13.100, 104.26.12.100, 2606:4700:20::681a:d64, ...
Connecting to forge-certificates.laravel.com (forge-certificates.laravel.com)|104.26.13.100|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'letsencrypt_script1590674546'
     0K ..                                                     17.5M=0s
2020-05-28 14:02:27 (17.5 MB/s) - 'letsencrypt_script1590674546' saved [2203]
Cloning into 'letsencrypt1590674547'...
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://wwwesp.nl/.well-known/acme-challenge/HuBn-rNcXm3Fb1tGffBFs414VOwDFLNf48Q2xpcUCIw [2a02:2268:ffff:ffff::4]: \"\u003c!DOCTYPE HTML PUBLIC \\"-//IETF//DTD HTML 2.0//EN\\"\u003e\n\u003chtml\u003e\u003chead\u003e\n\u003ctitle\u003e404 Not Found\u003c/title\u003e\n\u003c/head\u003e\u003cbody\u003e\n\u003ch1\u003eNot Found\u003c/h1\u003e\n\u003cp\"",
    "status": 403
  },
  "url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/4867823321/MqervQ",
  "token": "HuBn-rNcXm3Fb1tGffBFs414VOwDFLNf48Q2xpcUCIw",
  "validationRecord": [
    {
      "url": "http://wwwesp.nl/.well-known/acme-challenge/HuBn-rNcXm3Fb1tGffBFs414VOwDFLNf48Q2xpcUCIw",
      "hostname": "wwwesp.nl",
      "port": "80",
      "addressesResolved": [
        "185.95.13.191",
        "2a02:2268:ffff:ffff::4"
      ],
      "addressUsed": "2a02:2268:ffff:ffff::4"
    }
  ]
})

I can see that it says 404 Not Found, but status is 403? What’s the problem here? Been struggling with this for this afternoon, unfortunately.

0 likes
1 reply
bugsysha's avatar

I do not see 404. I see only 403. This might have happened to me 2-3 times. Just retried later and it worked.

Please or to participate in this conversation.