Articles in this section

How to assign a certificate to a domain in Plesk using CLI commands?

kb: how-to Plesk Obsidian for Windows Plesk Onyx for Linux

Question

How to assign a certificate to a domain in Plesk via CLI?

Answer

Plesk for Linux
  1. Connect to the server via SSH

  2. 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

  3. Assign the certificate to the domain:

    # plesk bin site -u example.com -certificate-name "Lets Encrypt example.com"

Plesk for Windows
  1. Connect to the server via RDP

  2. Start a command prompt as Administrator

  3. 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

  4. Assign the certificate to the domain:

    C:\> plesk bin site -u example.com -certificate-name "Lets Encrypt example.com"

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.