Hello I want to share one error I keep having with caddy and porkbun, if you find yourself with the next error “Invalid domain” it can be because an error with CNAME records. I solve it by changing my CNAME record into an A record.
Example log:
ERROR tls.obtain could not get certificate from issuer
{"identifier": "DOMAIN",
"issuer": "acme-staging-v02.api.letsencrypt.org-directory",
"error": "[DOMAIN] solving challenges: presenting for challenge: adding temporary record for zone \"DOMAIN.\": Invalid http response status, {\"status\":\"ERROR\",\"message\":\"Invalid domain.\"} (order=https://acme-staging-v02.api.letsencrypt.org/acme/order/123/123) (ca=https://acme-staging-v02.api.letsencrypt.org/directory)"}
Founded information in this post of traefik:
Have a great day!