Automatically enable HTTPS on your website with EFF’s Certbot, deploying Let’s Encrypt certificates.

Website: https://certbot.eff.org/

For Apache on Ubuntu 16.04

$ sudo apt-get install python-letsencrypt-apache 
$ sudo letsencrypt --apache

Add cornjob

$ sudo vi /etc/crontab
# renew domain certificate
00 7   * * * root letsencrypt renew
00 19  * * * root letsencrypt renew