How to create a self-signed certificate for my domain in IIS 7

No specific Bitcoin Bounty has been announced by author. Still, anyone could send Bitcoin Tips to those who provide a good answer.

Hello everyone.

Can I make a self-signed certificate for my own domain name in IIS 7? I need it for development and testing.

I have found this utility in IIS 7, however it generates a certificate with the following canonical name, and I need it to be my custom domain, which is different from the above

Like this:

enter image description here

But I can generate legacy certificate where CN will be because otherwise browser shows this error:

enter image description here


Good question :)

1 Answer - total earned - 1.4 mBTC ($0.34 USD)

1 tip with total amount of 1.4 mBTC($0.34 USD) have been sent by lampego


There is one simple way:

  • Open Powershell ISE as admin and run this command:

New-SelfSignedCertificate -DnsName, localhost -CertStoreLocation cert:\LocalMachine\My

To trust the new certificate:

  • Go to Console Root -> Certificates (Local Computer) -> Personal
    Select the certificate you have created, do right click -> Copy
  • Go to Console Root -> Certificates -> Trusted Root Certification Authorities and paste you copied certificate
  • Export and follow the export wizard to create a .pfx file

Good answer :)


Post Answer

Top 3 Tippers
Recent Tips

Will Bitcoin Tipping become a new Internet Culture?

Please share our story! THANK YOU!