How to Configure a Free Domain HTTPS Certificate for a WordPress Blogging Site

How to Configure a Free Domain HTTPS Certificate for a WordPress Blogging Site

In this article, YY will introduce to you how to configure HTTPS certificates for WordPress sites

Preconditions:

In this example, assume that we already have our own domain name: bestexpresser.com, and have configured dev.bestexpresser.coma custom domain name according to "Tutorial 5". Next, we will apply for a domain name certificate, configure it in cpolar, and let our site support the HTTPS protocol.

Step 1 Apply for a free domain name HTTPS certificate

If your domain name is purchased from Alibaba Cloud or Tencent Cloud, usually the platform can apply for a free subdomain certificate. In this example, we can apply for a dev.bestexpresser.com free domain name HTTPS certificate on Alibaba Cloud. For details, please refer to: "How to apply for Alibaba Cloud's free domain name HTTPS certificate for a blog website"

Step 2 Configure the HTTP certificate to the configuration file of cpolar

When we get the HTTPS certificate file package of the website, there are two files in it, one is the site certificate file, and the other is the site key key file.

2.1 Create a certificate folder

  • We create a certs folder in the root directory of the D disk to save the certificate file.
  • Create another certificate folder for the current domain name: site1
  • Then copy the obtained certificate file to the site1 file.

The details are as follows:

img

2.2 Modify the cpolar configuration file

Use vs code to open the cpolar configuration file

In the configuration file, find the WordPress tunnel. Under the tunnel, add two parameters, crt and key, as shown in the red box in the figure below.

img

Parameter Description:

  • crt: the full path of the site's certificate file
  • key: the full path of the site key file

Save and exit.

2.3 Restart the cpolar service

In the taskbar search, enter 服务, click to open

img

In 服务the list, find Cpolar Service, click the right mouse button, select 重新启动, restart service.

2.4 Check whether the background Wordpress tunnel is online and normal

cpolar background – status – online tunnel list

img

2.5 Open the site test with a browser

Open the browser and use the https protocol to access the site, in this example: https://dev.bestexpresser.com/

img

We see the small lock next to the address, which proves that the configuration is successful!

Summarize:

We have applied for an HTTP certificate for the domain name and configured it in cpolar to make our site more formal and our users more secure.

Reprinted from the cpolar pole cloud article: How to configure a free domain name HTTPS certificate for a WordPress blog site

Guess you like

Origin blog.csdn.net/YYDsis/article/details/131958160