What is the CN name in your certificate?
See the Choosing a Certificate in https://learn.microsoft.com/en-us/iis/manage/configuring-security/how-to-set-up-ssl-on-iis
- That the certificate's "Common Name" (CN) matches the host header in the request. For example, if the client is making a request to
https://www.contoso.com/
, then the CN must bewww.contoso.com
.
If your certificate has a test name like MyTestSite.com, then in order to get the name resolved you can add an entry in the hosts file.
127.0.0.1 MyTestSite.com
https://www.howtogeek.com/784196/how-to-edit-the-hosts-file-on-windows-10-or-11/