Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

AutoSSL errors, not renewing certificate

Discussion in 'Security' started by Volt55, May 30, 2018.

  1. Volt55

    Volt55 Member

    Joined:
    Feb 20, 2017
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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!
     
    #1 Volt55, May 30, 2018
    Last edited by a moderator: Jun 21, 2018
  2. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,838
    Likes Received:
    276
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Neutrall

    Neutrall Member
    PartnerNOC

    Joined:
    Jul 22, 2014
    Messages:
    24
    Likes Received:
    2
    Trophy Points:
    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).
     
  4. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    218
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Indiana, USA
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,838
    Likes Received:
    276
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Neutrall you're correct the HTTP validation won't complete if CloudFlare's SSL is already in place.

    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Volt55

    Volt55 Member

    Joined:
    Feb 20, 2017
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  7. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,838
    Likes Received:
    276
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Volt55

    Volt55 Member

    Joined:
    Feb 20, 2017
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  9. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,838
    Likes Received:
    276
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Volt55

    Volt55 Member

    Joined:
    Feb 20, 2017
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    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.
     
  11. Volt55

    Volt55 Member

    Joined:
    Feb 20, 2017
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  12. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,838
    Likes Received:
    276
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice