cPanel AutoSSL Redirect Error: Exclude files from being redirected

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @philsward,

Thank you for sharing the workaround.

As far as why this happens, the AutoSSL DCV check needs to access the control file via the HTTP protocol in order to validate. Thus, when a global redirect for HTTP to HTTPS is configured, it will lead to the validation failure you have reported.

I encourage you to vote and add feedback to the following feature request, as it would allow for DNS-based AutoSSL verification:

AutoSSL: DNS challenge validation

Thank you.
 

WorkinOnIt

Well-Known Member
Aug 3, 2016
300
52
78
UK
cPanel Access Level
Root Administrator
I'm assuming you already have "Use a Global DCV Passthrough instead of .htaccess modification (requires EA4)" enabled under the "Domains" tab in "WHM >> Tweak Settings". If so, here are a couple of rules you could add to the .htaccess file that have worked for others facing the same issue:

Code:
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
I would like to chime in to this - I also have the same error message in Auto SSL - due to a domain in CloudFlare having Strict SSL and the "Always use HTTPS" = true setting enabled.

I checked to ensure that the "Use a Global DCV Passthrough" in WHM tweak settings was ON - but it didn't help.

However, adding the .htaccess rules worked - but that is definitely a pain to do for lots of sites. Why can't this check be added to the AutoSSL function in WHM?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @WorkinOnIt,

Support for DNS-based domain control validation (DCV) is tentatively planned for cPanel & WHM version 74. This will help ensure the validation succeeds in cases where the current HTTP-based DCV fails.

Thank you.