How to secure website using Let’s Encrypt


Certbot is part of EFF’s effort to encrypt the entire Internet. Secure communication over the Web relies on HTTPS, which requires the use of a digital certificate that lets browsers verify the identity of web servers (e.g., is that really Web servers obtain their certificates from trusted third parties called certificate authorities (CAs). Certbot is an easy-to-use client that fetches a certificate from Let’s Encrypt—an open certificate authority launched by the EFF, Mozilla, and others—and deploys it to a web server.

Obtaining an SSL Certificate

To obtain an SSL certificate with Let’s Encrypt, you will need to install client Certbot on your server. In our case we will use default Ubuntu package repositories to install Certbot.


sudo apt install certbot python3-certbot-apache


sudo apt install certbot python3-certbot-nginx

Run this command to get a certificate and have Certbot edit your apache configuration automatically to serve it, turning on HTTPS access in a single step.


sudo certbot --apache -d -d


sudo certbot --nginx -d -d

Test automatic renewal

The Certbot packages on your system come with a cron job or systemd timer that will renew your certificates automatically before they expire. You will not need to run Certbot again, unless you change your configuration. You can test automatic renewal for your certificates by running this command:

sudo certbot renew --dry-run

You can add this command in cronjob running crontab -e:

@monthly certbot renew --post-hook "systemctl reload nginx"

Or for apache:

@monthly certbot renew --post-hook "systemctl reload apache"

Testing the HTTPS Connection

Next step is to confirm that your website is properly configured to use new certificate and is accessible over HTTPS. To do this, navigate to your website over web browser, making sure to specify the https:// protocol when entering your URL.

Always check your SSL grade and follow some of the best practice to have higher level of security.

Use Current SSL/TLS Protocols (TLS 1.2 or 1.3)

SSLProtocol -all +TLSv1.3 +TLSv1.2

Chose secure cipher suites:


Always use HSTS:

Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"

You can check a suggestions from or Mozilla Intermediate Ciphers Recommendation.

Join our team

If you're interested in joining our team to assist in researching modern threats across web3, please don't hesitate to reach out to us.

Contact Us

Ready for Action?

Don’t hesitate to contact us if you need more information.
Let's Go!
BTC: bc1qnn4zfqqtexl4fkjk2vz6tk74sn92x326wwn0ph

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram