However, the website was showing as not secure.
After this I ran : sudo systemctl restart nginx
Then the website became secure.
What can I do so that I do not need to restart nginx everytime the certificate renews?
I can login to a root shell on my machine (yes or no, or I don't know): yes
I am using Nginx 1.14.0 on ubuntu 18.04.5
The version of my client is : certbot 0.31.0
When using certbot certonly to create a certificate, it's usually desirable to include deploy hook as part of the original command:
--deploy-hook "systemctl reload nginx"
If you want this change to affect all your current and future certificates, you could add this line to /etc/letsencrypt/cli.ini:
deploy-hook = systemctl reload nginx
or add an executable script to the /etc/letsencrypt/renewal-hooks/deploy/ directory which reloads nginx.
To make this change just for this one certificate, you could forcefully renew the certificate now (just once) and it will reload nginx on every subsequent renewal: