SOLVED CPANEL-38866 - How to exclude multiple domains of multiple cPanel accounts from AutoSSL via SSH

Inna

Active Member
Mar 10, 2018
41
6
58
Iran
cPanel Access Level
Root Administrator
Hello,

Suppose these are my clients' cPanel accounts:

domain1.com (www and mail are in SSL/TLS Status option too)
domain2.com (www and mail are in SSL/TLS Status option too)
domain3.com (www and mail are in SSL/TLS Status option too)
domain4.com (www and mail are in SSL/TLS Status option too)
domain5.com (www and mail are in SSL/TLS Status option too)

In fact, they are 105 accounts.
I need to exclude each www and mail from AutoSSL renew, and only the main domain (domain1, domain2, ...) remain active in renewal progress.

How can I exclude them via SSH? Is there any way to do that instead of logging in to 105 single accounts:)?
 

Inna

Active Member
Mar 10, 2018
41
6
58
Iran
cPanel Access Level
Root Administrator
Hey there! The closest thing I would have would be this API call:


Can you try using that and see if that works for your needs?
Thanks for the link and docs, but the only issue is this. Suppose the below command:
Code:
whmapi1 --output=jsonpretty add_autossl_user_excluded_domains username='user' domain=www.ip.domain.com domain1=www.domain.com
in cPanel interface, the order is like this:
The issue with the above command is that the respond is OK, but only the domain in the first parameter (in this case, it is www.ip.domain.com) is implemented.
If I change it to domain=www.domain.com domain1=www.ip.domain.com only www.domain.com is exluced.

The doc says domain=domain=example.com domain1=example1.com domain2=example2.com but the syntax is wrong and if I run this command I get this error:
Code:
[root@fqdn ~]# whmapi1 --output=jsonpretty add_autossl_user_excluded_domains username='user' domain=domain=www.ip.domain.com domain1=www.domain.com
{
   "metadata" : {
      "reason" : "API failure: (XID 42pcds) You do not own the following domain: domain=www.ip.domain.com.",
      "command" : "add_autossl_user_excluded_domains",
      "version" : 1,
      "result" : 0
   }
}
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
I've created a case with our team to look into that API behavior. If you're signed in to our system, you can follow along with https://support.cpanel.net/hc/en-us/articles/4410084409239 to receive updates on that.

At this time, the only workaround I have available is to run multiple API commands, or use the cPanel >> SSL/TLS Status interface to get those domains excluded.
 
  • Like
Reactions: Inna