Question
How can the included and excluded domains for AutoSSL be managed from the command line?
Answer
Note: Domain inclusion/exclusion must first be enabled by adding the following text to the /var/cpanel/panel.ini file. Create the file if it does not exist.
CONFIG_TEXT: [global]
ssl.autossl_in_unified = true
Once domain inclusion/exclusion is enabled:
- Access the cPanel interface and navigate to Security / SSL/TLS Certificates.
- Select the Status tab.
- Select the domains you want to change.
- Click the Include X Domains in AutoSSL or Exclude X Domains from AutoSSL button.
- Click the Run AutoSSL button to issue a new certificate immediately if desired.
Note: The commands must have the $user variable replaced with the cPanel username you are trying to edit. The domain.tld is used as a placeholder and should be replaced by the domain you want to include or exclude in AutoSSL. To include or exclude multiple domains, use a comma-separated list in the domains field.
For example, domains='domain.tld,domain2.tld,domain3.tld'.
-
To include a domain in AutoSSL, run the following API as the root user using SSH or the Terminal feature in WHM
# uapi --user=$user SSL remove_autossl_excluded_domains domains='domain.tld'
-
To exclude a domain in AutoSSL, run the following API as the root user using SSH or the Terminal feature in WHM:
# uapi --user=$user SSL add_autossl_excluded_domains domains='domain.tld'
Note: The domain.tld is used as a placeholder and should be replaced by the domain you want to include or exclude in AutoSSL. To include or exclude multiple domains, use a comma-separated list in the domains field.
For example, domains='domain.tld,domain2.tld,domain3.tld'.
-
To include a domain in AutoSSL, run the following API as the cPanel user using SSH or the Terminal feature in the account's cPanel:
# uapi SSL remove_autossl_excluded_domains domains='domain.tld'
-
To exclude a domain in AutoSSL, run the following API as the cPanel user using SSH or the Terminal feature in the account's cPanel:
# uapi SSL add_autossl_excluded_domains domains='domain.tld'
Additional resources
WHM API - AutoSSL Generated Certificates
cPanel UAPI - AutoSSL Generated Certificates
How can I remove all excluded domains for AutoSSL via the command line
Unable to include or exclude domains from AutoSSL using SSL/TLS Certificates interface
Comments
0 comments
Article is closed for comments.