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

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

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 CN=computer.name.domain., 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 dev.my.domain.com because otherwise browser shows this error:

enter image description here

Thanks!

User rating:

Good question :)

1 Answer

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

Hello.

There is one simple way:

  • Open Powershell ISE as admin and run this command:

New-SelfSignedCertificate -DnsName your.domain.name.com, 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
SEND BITCOIN TIPS
User rating:

Good answer :)

2

Too many commands? Learning new syntax?

FavScripts.com is a free tool to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.

Boost your productivity with FavScripts.com!

Post Answer