SSL Configuration Error After Removing SharePoint Web Application

[Occurred on SharePoint 2016]

When you delete a web application in SharePoint, whether through PowerShell or Central Admin, you can instruct SharePoint to remove the associated IIS site with it. However, if the web application is running on port 443, the SSL certificate binding may need to be cleaned up manually.

At first glance, one might assume that deleting the IIS site would automatically remove the SSL binding, as the site would no longer be available. Unfortunately, this is not always the case. This can be verified by checking the Windows System event logs, which would become flooded with Event ID 15021 errors if the binding is not cleaned up:

"An error occurred while using SSL configuration for endpoint <webAppIP>:443.  The error status code is contained within the returned data."


Diagnosis

Use the netsh http command to diagnose and fix the error. You can include the reported IP address from the System event logs in the command to verify the existence of the certificate binding:

netsh http show sslcert ipport=<ipAddress:port>

Example:


You can also ensure that  the certificate is no longer in the certificate store by using the Certificate Hash value from the output above (i.e. thumbprint):


Remedy

To remove the obsolete certificate, run the following netsh http command:

netsh http delete sslcert ipport=<ipAddress:port>

Example:


In addition to using the netsh http show command to confirm the deletion above, you can now see that the errors have stopped appearing in the System event logs following the confirmation message of the cert binding deletion:









Popular posts from this blog

October 2025 SharePoint CU Failed to Install After Applying September 2025 SharePoint CU

September 2025 SharePoint 2016 CU - Configuration Wizard failed

Broken Site Collection