AutoSSL errors, not renewing certificate

Volt55

Member
Feb 20, 2017
17
1
3
UK
cPanel Access Level
Root Administrator
I have multiple Wordpress websites that are failing AutoSSL. Note that I am forcing SSL at Cloudflare.
Code:
 6:47:07 PM Checking “example.com” …
 6:47:07 PM ERROR TLS Status: Defective
 ERROR Certificate expiry: 5/17/18, 12:00 AM UTC (13.74 days ago)
 ERROR Defect: OPENSSL_VERIFY: The certificate chain failed OpenSSL’s verification (0:10:CERT_HAS_EXPIRED).
 Redirection #1 (example.com): http://example.com/.well-known/pki-validation/00CAA51FED8AE75FC682E11F15104C22.txt → https://example.com/.well-known/pki-validation/00CAA51FED8AE75FC682E11F15104C22.txt
 WARN Local DCV error (example.com): “cPanel (powered by Comodo)” forbids DCV HTTP redirections.
 Redirection #1 (www.example.com): http://www.example.com/.well-known/pki-validation/64BA9F73A3A773EE10167625B24F8322.txt → https://www.example.com/.well-known/pki-validation/64BA9F73A3A773EE10167625B24F8322.txt
 WARN Local DCV error (www.example.com): “cPanel (powered by Comodo)” forbids DCV HTTP redirections.
 WARN Local DCV error (mail.example.com): “mail.example.com” does not resolve to any IPv4 addresses on the internet.
 WARN Local DCV error (webmail.example.com): “webmail.example.com” does not resolve to any IPv4 addresses on the internet.
 WARN Local DCV error (webmail.example.com): “webmail.example.com” does not resolve to any IPv4 addresses on the internet.
 6:47:08 PM WARN Local DCV error (cpanel.example.com): “cpanel.example.com” does not resolve to any IPv4 addresses on the internet.
 WARN Local DCV error (cpanel.example.com): “cpanel.example.com” does not resolve to any IPv4 addresses on the internet.
 6:47:12 PM WARN Local DCV error (webdisk.example.com): “webdisk.example.com” does not resolve to any IPv4 addresses on the internet.
 WARN Local DCV error (webdisk.example.com): “webdisk.example.com” does not resolve to any IPv4 addresses on the internet.
 ERROR Impediment: TOTAL_DCV_FAILURE: Every domain failed DCV.
Here is the standard Wordpress redirect which I have added the currently recommended cPanel lines to:
Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule . /index.php [L]
</IfModule>
There are also a few 301 redirects in there like this:

Redirect 301 /product-information/ example.com'

I'm not sure how to pass the AutoSSL update request through to the domain if I'm forcing SSL via Cloudflare. Really need some help on this, I have tried many variants of code but I can't see what the auto-inserted domain validation code is doing and whether it needs modifying somehow.

Thanks in advance!
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
HI @Volt55


AutoSSL will not work with a forced redirection to https at CloudFlare. The DCV check needs to be able to complete over http. If you login to your CloudFlare dashboard and modify the forced redirection temporarily are you able to complete the DCV check? Furthermore you may be able to add an exception at Cloudflare for the dcv check using their "Page Rules" settings.
 

Neutrall

Active Member
PartnerNOC
Jul 22, 2014
26
3
3
cPanel Access Level
DataCenter Provider
This might be an old thread, but I've bumped into the same problem today.

The Comodo certificate is unfortunately not compatible with the Cloudflare services. But if you do not have too many site on your server (check the limitation of the Let's Encryt SSL here), using the Let's encrypt plugin will allow the AutoSSL to renew your SSL even if you are using the CloudFlare service (Withi Full or Full Strick setting).
 

MikeDVB

Well-Known Member
PartnerNOC
Jun 4, 2008
220
6
68
Indiana, USA
HI @Volt55


AutoSSL will not work with a forced redirection to https at CloudFlare. The DCV check needs to be able to complete over http. If you login to your CloudFlare dashboard and modify the forced redirection temporarily are you able to complete the DCV check? Furthermore you may be able to add an exception at Cloudflare for the dcv check using their "Page Rules" settings.
That's unfortunate. I have always wondered why some Certificate Authorities require HTTP to verify a domain.

I know DigiCert did this for a little bit after buying Symantec - but they reverted the behavior.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
The Comodo certificate is unfortunately not compatible with the Cloudflare services.
Hi @Neutrall you're correct the HTTP validation won't complete if CloudFlare's SSL is already in place.

That's unfortunate. I have always wondered why some Certificate Authorities require HTTP to verify a domain.
Most CA's use HTTP validation with options for other methods. Until recently no other forms of validation were possible with Comodo's free certificate. I am happy to say though that v74 of cPanel offers a DNS validation backup option in the event that validation over HTTP fails.

Thanks!
 

Volt55

Member
Feb 20, 2017
17
1
3
UK
cPanel Access Level
Root Administrator
Thanks for the replies, I am still struggling to get this sorted. I don't want to add Lets Encrypt really because of their limitations. Also, I have cPanel and Cloudflare which should really play well with each other and not require another additional software to be added into the mix. I'm struggling to find the best method that gives me the best protection with Cloudflare (strict SSL) but the least amount of maintenance time (eg. turning off Cloudflare to get AutoSSL on every domain). There is lots of conflicting advice out there.

Has anyone tried a Cloudflare page rule that overcomes this? Perhaps someone can also point me towards how I can setup DNS validation and whether this then suppresses the frequent AutoSSL failure messages?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @Volt55

CloudFlare has instructions on the page rules here How do I create a Page Rule?

Upon updating to v74 of cPanel you will automatically have the DNS validation method fallback so you shouldn't have to make any modifications. v74 of cPanel is still in CURRENT but should be moved to RELEASE soon

Thanks!
 

Volt55

Member
Feb 20, 2017
17
1
3
UK
cPanel Access Level
Root Administrator
Thanks, can you help me with the page rule please?
I added this to Cloudflare:

When the page matches
http://example.com/.well-known/pki-validation/*

Do
SSL: OFF
Automatic https rewrites: OFF

This still fails the AutoSSL check though; the error shows a redirection to https. I have no redirection in my .htaccess but the site does run Wordpress and there isn't any text file in my .well-known/pki-validation/ folder. If I create one (say x.txt) it shows in the browser but still gets redirected to https. Should there be a text file in there and, if so, what generates this?
 

Volt55

Member
Feb 20, 2017
17
1
3
UK
cPanel Access Level
Root Administrator
Hi @Volt55

There will be a .txt file created by the autoSSL process which is removed after the validation check is finished or does not succeed.
Thanks Lauren. So what else would cause the https redirect if I have no rules in .htaccess and the Cloudflare rule says to turn off SSL for this folder? It's a Wordpress site but there are no plugins which do this installed.
 

Volt55

Member
Feb 20, 2017
17
1
3
UK
cPanel Access Level
Root Administrator
Just managed to renew the certificate by manually turning off "Always use https" in Cloudflare. The page rule is obviously not working or it can't control that? If I select "SSL: Off" in the page rules, then it greys out the "Always use https" toggle which seems to point to the fact that this is disabled on turning off SSL. Any ideas?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @Volt55

You can force https through the WP Dashboard but it would appear that you found the solution. Unfortunately while I can give you some suggestions on how to manage CloudFlare we are not CloudFlare experts and the best advice I can give you for questions about their products would be to check with them directly. They have a forum here Cloudflare Community