2

Getting a SSL certificate issue in existing site in local system.

enter image description here

Could someone assist me how I can resolve this ?

1 Answer 1

3

Most probably your website uses wrong certificate or certificate already expired.

Create new certificate:

Start powershell as administrator and run New-SelfSignedCertificate with proper parameters. Depending on your powershell version, you may need to include different set of parameters, so best check New-SelfSignedCertificate documentation if the one below doesn't work for you:

New-SelfSignedCertificate -DnsName "your.local" -CertStoreLocation "cert:\LocalMachine\My"

That will create new certificate in your personal store.

Add new certificate to trusted store

Start Microsoft Management Console by running mmc.exe

enter image description here

Click File -> Add/Remove Span-in

enter image description here

Double click Certificates and select Computer Account, then select Local computer if asked.

Expand Personal and select Certificates. You should see your new certificate there. And potentially the old one as well. You can distinguish them by Expiration Date.

enter image description here

Remove the old one if it's there.

Copy new certificate to Trusted Root Certification Authorities\Certificates (e.g. drag and drop with ctrl key pressed).

enter image description here

Check if new certificate is there in Trusted Root Certification Authorities\Certificates and remove old one if it's there.

Update binding on IIS

Go to IIS manager, select your site and edit bindings. Select your new certificate:

enter image description here

Retest in browser

That should do the trick. Open your browser (best in private mode as certificates can be cached e.g. in chrome) and check if your new certificate is used and marked as secure:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.