When you buy an SSL Certificate from a trusted SSL provider, install in on the server and do all needful redirections. Occasionally, though, something goes wrong and you face an error. There are many different types of SSL Certificate error and SSL Certificate with Wrong Hostname is another Teasing error.
This error appears commonly when you made a mistake while generating an SSL Certificate. This guide focuses on identifying and troubleshooting this wrong hostname error.
Why Wrong Hostname Error?
For the most part, you see this error if you have commonName (CN) of the SSL certificate presented on this service is for a different machine.
How to Fix SSL with Wrong Hostname Error?
Here is the simple solution – “Purchase or generate a proper certificate for this service.”
This error appears if you installed your SSL Certificate with wrong CN name or Subject Alternative Name (SAN).
How does it work?
Let’s we understand it in a simple example, Mr. A want to connect your website over SSL/TLS, you send them an SSL Certificate. Then Mr. A’s server tries to connect the domain name they were connecting to (www.yoursite.com) to the CN and SAN of the presented certificate. But, the hostname name mismatches or appears wrong then Mr. A will see this error.
So, if you want to solve this problem then you have to create a new SSL Certificate with appropriate CN and update the certificate.
I hope this solution solved your issue.