Wednesday, May 1, 2024

Create self signed SSL certificate to host sitecore CD CM in IIS with https

Open powershell in admin mode

  1. Run below set of commands

New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname "sitecorewebsite.cd" -FriendlyName "sitecorewebsite.cd" -NotAfter (Get-Date).AddYears(5)
  1. copy and note down the Thumbprint value generated from above powershell Command

  2. Run below command

Export-Certificate -Cert cert:\localMachine\my\<paste- copied-thumbprint-of-cert-value> -FilePath "C:\certificates\sitecorewebsite.cd.pfx"

Make sure self signed ssl cert created for right website name for e.g sitecorewebsite.cd

  1. Go to c:/certificate and lookup for generated certificate name as sitecorewebsite.cd.pfx

  2. Next step is to add the above generated certificate to a trusted certificate authority

  3. Go to run and type mmc.exe

  4. Select file-->Add/Remove-snap-in

  5. Double click on certificates, Choose the ‘Computer account' option, then 'Local computer’ & Click Finish

  6. The cert that you exported should already be visible in the 'Personal' store of your Local Computer

  7. Copy the cert from personal store and paste it in Trusted Root Certificates Authorities

  8. Go to IIS and navigate your site, add binding https and select the certificate from the dropdown. Restart IIS and you should be able to browse your site with https.

No comments :