Apply for Certificate#
There are many tools available online for applying for free certificates. I stumbled upon a website that allows online operations (more free options are provided in the "Others" section at the end of this article): https://httpsok.com
After logging in by scanning the QR code with WeChat, click on the certificate management menu on the left, then click the free apply for certificate button on the right, and follow the prompts on the page to complete the operation. After finishing, wait for 1 minute to complete the application:
Download Certificate#
Once the certificate status changes to "Issued," you can click the download button. Here, I choose the IIS type for download:
After downloading, you will receive a compressed file. Extract it to get two files:
_.yourdomain.pfx
pfx-password.txt
Configure IIS#
Note the prerequisites:
Then click the help button next to the just downloaded certificate button, which will redirect to: https://help.aliyun.com/zh/ssl-certificate/user-guide/install-ssl-certificates-on-iis-servers
You can directly look at step two.
Configure HTTP Redirection to HTTPS#
There are two methods.
The first and simplest method is to use the middleware provided by Microsoft: https://learn.microsoft.com/en-us/aspnet/core/security/enforcing-ssl
The second method is to use Url Rewrite in IIS: https://sdwh.dev/posts/2021/09/IIS-Http-Redirect-To-Https/
Others#
- Open Source Tools
- Commercial Tools