If you are using Cloudflare, you need to set the SSL mode to Full in your Cloudflare account.

How to receive SSL?

You can receive a free SSL certificate for your domain by using Let’s Encrypt or Cloudflare. Follow the steps below to get an SSL certificate for your domain:

  1. Certbot: You most likely have Certbot installed on your server. If not, you can install it by using the following command:
sudo apt update
sudo apt install certbot python3-certbot-nginx -y
  1. Run Certbot: After installing Certbot, you can run it by using the following command:
sudo certbot --nginx
  1. Follow the instructions: Certbot will ask you a few questions, such as your email address and domain name. Make sure to enter the correct information.
  2. Select the domain: Certbot will automatically detect your domain name and ask you to select it. Make sure to select the correct domain name.
  3. Select the SSL option: Certbot will ask you if you want to redirect HTTP traffic to HTTPS. Select the option to redirect HTTP traffic to HTTPS.
  4. Wait for the process to complete: Certbot will automatically generate and install the SSL certificate for your domain. This process may take a few minutes.
  5. Check the SSL certificate: After the process is complete, you can check if the SSL certificate is installed correctly by visiting your domain in a web browser. You should see a padlock icon in the address bar, indicating that the connection is secure.

If the SSL certificate installed but you still see the Not Secure message in your browser, you need to clear your browser cache and cookies by using CTRL + SHIFT + R or CTRL + F5.

How to renew SSL?

You can renew the SSL certificate by using the following command:

sudo certbot renew