To properly configure an SSL certificate using Cloudflare, you need:
Configure a domain on the Cloudflare side.
Tune work of an SSL certificate within Cloudflare and write out a certificate for hosting.
Install, obtained in the second paragraph, the certificate on the hosting.
To set up a certificate on the Cloudflare side and then create a certificate for hosting, you need:
Signin to your Cloudflare account.
Go to the section "
SSL/TLS»:

In section "
Overview"Select the appropriate principle of the certificate (it is recommended to select"
Full (strict)", The process of its configuration will be described later):

After choosing how encryption works, go to the section "
Origin server" and press "
Create Certificate»:

Specify the data for creating a certificate:

Select "Let Cloudflare generate a private key and a CSR"(Creating a CSR request from Cloudflare).
Specify the required domains and subdomains to be included in the certificate.
Select a certificate expiration date.
Click "Next».
Do not close the window that opens before completing all the actions. Opposite "Key format»Select«PEM (Default)”, Then copy the following certificate and key into different files (file extension can be any).
Install the certificate on the hosting using the generated files.