Symptoms
Unable to delete SSL certificate from a domain example.com in Domains > example.com > SSL/TLS Certificates:
Unable to remove certificates: one or several certificates are assigned to the IP addresses/domains.
or:
Unable to remove SSL/TLS certificates. One or more certificates are used by websites.
Cause
The certificate is assigned to another domain, to webmail or to an IP address and is currently in use.
Resolution
SSL certificate is used for webmail
Check if SSL was used to secure site's webmail:
- Log in to Plesk
- Open Domains > example.com > Mail Settings
- If SSL is selected to protect webmail, un-check it
- Remove SSL in Domains > example.com > SSL/TLS Certificates
SSL certificate is used for IP address
Find an IP address where SSL is used:
- Log in to Plesk
- Go to Tools & Settings > IP Addresses > open IP > check SSL/TLS certificate section for each IP address. If SSL that is required to be removed is assigned to an IP address, switch (change) it to a different SSL or to default certificate:
SSL certificate is used for another domain
Find if there are other domains using the same SSL:
- Connect to the server via SSH on Linux or via RDP on Windows
- Backup Plesk database
- Login to Plesk database
- Retrieve the certificate ID:
select id, name from certificates where name = 'test_ssl';
+----+-----------+
| id | name |
+----+-----------+
| 7 | test_ssl |
+----+-----------+
1 row in set (0.00 sec)'test_ssl' is the name of the certificate that you are trying to remove. It can be checked at Domains > example.com > SSL Certificates > Name:
-
Find all domains that have the same SSL assigned:
select d.name from domains d inner join hosting h on h.dom_id = d.id where h.certificate_id = 7;
+----------------------+
| name |
+----------------------+
| example.com |
| example2.com |
+----------------------+
2 rows in set (0.00 sec) - Log in to Plesk
- Open Domains > example2.com > Hosting Settings and switch "test_ssl" to "Not Selected".