SSL is essential nowadays because web browsers display warnings when it’s not available on a website. This applies to local sites, such as websites hosted on your computer for testing purposes. Buying an SSL certificate for a local site is not very useful, so you can create self-signed SSL certificates in Windows 11/10 for these sites instead. This guide will walk you through the process.
Create Self-signed SSL Certificates in Windows 11/10
Open a PowerShell window with admin privileges. Execute the following command. Make sure to set the exact site name you plan to use on the local computer,
New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName "mylocalsite.local" -FriendlyName "MyLocalSiteCert" -NotAfter (Get-Date).AddYears(10)
If you want to test all the original certificate parameters, you can use the CloneCert
parameter —more on the official document.
How to apply or install the certificate on the local website on the computer
Once you have the certificate, you will need to install the computer certificate so browsers can find it. You will need to copy it to the Trusted Root Certification Authorities store.
In the Start Menu, type Manage computer certificates and click to open the Local computer certificates storehouse. You will need admin permission to complete the process.
- Navigate to Certificates – Local Computer > Personal > Certificates. This place stores all the local certificates that are created on the computer.
- Find the certificate you have created.
- Next, on the left panel, expand Trusted Root Certification Authorities > Certificates.
- Drag and drop the local certificate and drop into this folder
- You can also copy and paste it.
Once done, access the local site with HTTPS instead of HTTP. You may have to change the webserver so that any time the local site is accessed, it will redirect to the secured version.
I hope the post helped you create a local SSL certificate and install it on your computer so browsers don’t warn about the missing encryption.
Read: Difference between TLS and SSL encryption methods.
How to generate a self-signed certificate in Windows 11?
You can pretty easily generate a self-signed certificate using the PowerShell command-line utility. Use the New-SelfSignedCertificate cmdlet to create your certificates and then apply it using the Certificate Manager, check out the guide above to do the same.
Also Read: Import EFS File Encryption Certificate and Key (PFX file) in Windows.