The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Batch remove SSL

Discussion in 'Security' started by abdelhost77, Apr 26, 2017.

Tags:
  1. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    82
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Dears ,

    I enable by mistake the SSL for all accounts in the server ( trough AutoSSL) , and now i want to remove them all and activate SSL only for my customers who did pay it .
    My question : how to batch remove the SSL for all domains/subdomains ? because trough WHM => "Manage SSL Host" i can do it only one by one , any tips would be really helpful.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,281
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    There are no features in cPanel/WHM that will allow you to delete multiple SSL certificates at the same time. You'd have to develop a custom bash script that loops the following UAPI function for all domain names on your system:

    UAPI Functions - SSL::delete_ssl - Software Development Kit - cPanel Documentation

    Keep in mind that if the account does not have a SSL certificate installed (either through AutoSSL or a third-party), then a self-signed certificate is automatically applied to the domain names under the account.

    Thank you.
     
Loading...

Share This Page