Golden Codes - armanexplorer planet

Practical code snippets for Django, Python, Bash, Git and All!

View on GitHub

Usage Docs

install on Debian 12 with nginx

Link

sudo apt update
sudo apt upgrade

sudo apt install certbot python3-certbot-nginx

expand domans of a certificate

Add new domains to an existing certificate

method1

Docs

# shrink extra domains
certbot certonly --cert-name example.com -d example.com

# expand domains
certbot certonly --cert-name example.com -d example.org,www.example.org

method2

Docs

Consider using --cert-name instead of --expand, as it gives more control over which certificate is modified and it lets you remove domains as well as adding them.

certbot --expand -d existing.com,example.com,newdomain.com

# or
certbot --expand -d existing.com -d example.com -d newdomain.com

install multi-domain certifiacete

certbot certonly -d example.com -d www.example.com