Getting AutoSSL to work with Cloudflare in place.
THE PROBLEM
AutoSSL validates by retrieving a file from your site. With the record proxied, that request reaches Cloudflare rather than our server.
THE STRAIGHTFORWARD FIX
- Set the A record for the domain and www to DNS-only in Cloudflare.
- Wait a few minutes for the change to take effect.
- Run AutoSSL in cPanel.
- Confirm the certificate issued.
- Re-enable proxying.
Renewal faces the same issue. If renewals fail repeatedly, either leave the records DNS-only, or use a Cloudflare origin certificate instead.
AN ALTERNATIVE
Create a Cloudflare page rule or configuration that allows the /.well-known/acme-challenge/ path through without interference. This permits validation while proxying continues.
CHECKING WHETHER THIS IS YOUR PROBLEM
If AutoSSL fails and your nameservers point at Cloudflare, this is almost certainly the cause.
MAIL RECORDS
Always DNS-only, which means mail certificates issue normally.