Question
How to assign a certificate to a domain in Plesk via CLI?
Answer
Plesk for Linux
Plesk for Windows
-
Connect to the server via SSH
-
Retrieve the certificate name from the domain's certificate repository:
# plesk bin certificate --list -domain example.com
CSR Priv Cert CA Name Used
Y Y Y Y Lets Encrypt example.com 0 -
Assign the certificate to the domain:
# plesk bin site -u example.com -certificate-name "Lets Encrypt example.com"
-
Connect to the server via RDP
-
Retrieve the certificate name from the domain's certificate repository:
C:> plesk bin certificate --list -domain example.com
CSR Priv Cert CA Name Used
Y Y Y Y Lets Encrypt example.com 0 -
Assign the certificate to the domain:
C:> plesk bin site -u example.com -certificate-name "Lets Encrypt example.com"