Failed to get certificate: acme: Error 403 help!

Good Evening all,

I new to all this and was hoping to get some advice.
I’m running caddy in ubuntu 18.04.1 but really seem to be struggling.

when typing in this command sudo caddy -host mydomain.co.uk get this 403 error :

please help!

Hi @MrMiles156, welcome to the Caddy community.

mydomain.co.uk does not have any ‘A’ records, so a validated certificate can’t be issued by LetsEncrypt.

If you were just using it as an example, I’d suggest using example.com instead, or mysite.example, as these domains are reserved specifically for this purpose.

The partially-obscured domain in the image you provided does have an ‘A’ record, but attempts to access it result in a peculiar redirect chain:

HTTP/1.1 302 Found
Connection: close
Pragma: no-cache
cache-control: no-cache
Location: /UMhLZ/

HTTP/1.1 302 Found
Connection: close
Pragma: no-cache
cache-control: no-cache
Location: /

HTTP/1.1 301 Moved Permanently
Server: nginx/1.12.2
Date: Fri, 28 Sep 2018 06:33:50 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Location: [redacted]

The redacted final Location header points to an IP address that does not match the IP address given for the domain itself. LetsEncrypt will not follow this redirect - Caddy has to answer, and it must answer when directly accessed at the domain name you’re attempting to requisition a certificate for. Also, the final Location doesn’t seem to be responding (connection attempts time out from my end).

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