Create a Self-Signed certificate that is valid for 10 years

  • Open a PowerShell command with administrative permissions
  • Type the command, replace <site_name> with the name of your site as shown in Internet Information Services (IIS) and <name> with the name you can recognize it from. This will create a certificate that is valid for 10 years from the day you run the command:
    New-SelfSignedCertificate -Subject <site_name> -CertStoreLocation Cert:\LocalMachine\My -DnsName "<name>" -NotAfter (Get-Date).AddYears(10) -KeyUsage  DigitalSignature 
  • In IIS edit the binding for your site and assign the newly created certificate
  • Verify if you have selected the correct certificate with the View button
  • Restart the site
Comments are closed