🟩 Step 1: Create the Certificate (PowerShell)
Open PowerShell as Administrator and run:
New-SelfSignedCertificate ` -DnsName "Domain.dev.local" ` -CertStoreLocation "cert:\LocalMachine\My" ` -FriendlyName "Domain Local Dev Cert" ` -NotAfter (Get-Date).AddYears(5)This creates a certificate stored under Local Machine > Personal.🟩 Step 2: Export the Certificate (for trusting)PressWin + R→ typemmc→ Enter.Go to File > Add/Remove Snap-in.Add Certificates for Local Computer.Go to Certificates > Personal > CertificatesFind "Domain Local Dev Cert" or Domain.dev.local.Right-click it → All Tasks > Export (Base 64).Choose No, do not export the private key.Save it as a.cerfile (e.g.,domain.trust.cer).🟩 Step 3: Trust the CertificateIn MMC, go to:Certificates > Trusted Root Certification Authorities > CertificatesRight-click → All Tasks > Import.Import the.cerfile you just exported.Now your system will trust
https://Domain.dev.local/.🟩 Step 4: Bind Certificate in IIS
Open IIS Manager.
Go to Sites > Domain.dev.local (or your site name).
On the right → click Bindings.
Add or Edit an HTTPS binding:
select the one you created (by Friendly Name or domain).
No comments:
Post a Comment