Creating a Certificate (Private and Public Keys)

Last published : Apr 17, 2026
For private key:
  1. Go to the Start menu & click Administrative Tools > Internet Information Services (IIS) Manager and click the server's name in the Connections column on the left and double click Server Certificates.
  2. Click Create Self-Signed Certificate in the Actions column on the right.
  3. Type any meaningful name and then click OK to proceed.
Once that is complete, you should now see the SSL in the list of Self-Signed certificates. Now, you have IIS Self-Signed Certificate with 1 year validation.
  1. Right-click on that certificate and click Export.
Specify the path, type the password, confirm the password, and click OK. Now, you have exported the Private key.
For public key:
  1. Launch Microsoft Management Console. Press Win+R, type mmc.exe and click OK.
  2. Click File and select the Add/Remove Snap-in option.
  3. Click Certificates in the list of Available snap-ins and then click Add.
  4. Select Computer account and click Next. Choose Local Computer and click Finish.
  5. Click OK to add the certificate snap-in and get back to console.
  6. Expand the Personal folder in the left-side menu and choose Certificates.
  7. Right-click the certificate you want to export - All Tasks > Export.
  8. On the prompt menu, click Next.
  9. Click No. Do not export the private key.
  10. Choose Base-64 encoded X.509 (.CER) and click Next.
  11. Fill in the file path and click Next.
  12. Click Finish and now you have the Public key.
Related information