Why generate the command instead of the key here?
Generating the private key in a browser tab is risky — extensions, cached pages, and screen-sharing tools can leak it. The right place to create a key is the host that will use it (your server, a hardware token, or a CA gateway). This tool builds the exact openssl req command you should run there, so you keep custody of the key from the moment it exists.
What is a CSR?
A Certificate Signing Request (CSR) is a PEM-encoded blob containing your public key and identifying information (Common Name, organisation, country, SANs) that you send to a Certificate Authority. The CA verifies you control the names listed and signs a certificate that binds them to your public key. The corresponding private key never leaves your server.
What are SANs?
Subject Alternative Names extend a certificate to cover multiple hostnames (example.com, www.example.com, api.example.com) or IP addresses. Modern browsers ignore the legacy CN field and validate strictly against SANs, so every CSR for a public site must include a subjectAltName extension — even if there is only one hostname.
RSA vs ECDSA — which to pick?
ECDSA (P-256) keys are smaller, faster on the wire, and offer equivalent security to RSA-3072 with about 1/10 the bytes. Most public CAs and modern browsers accept ECDSA happily. RSA-2048 remains the safest interop choice for old clients (Java 6, IoT firmware, legacy SMTP gateways). When in doubt, ship both — most servers can serve a dual cert chain.
Can I add wildcard SANs?
Yes — enter *.example.com in the SAN field. Public CAs allow one level of wildcard (*.example.com matches api.example.com but not foo.api.example.com). DV wildcard issuance requires DNS-01 validation; HTTP-01 cannot prove control of an arbitrary subdomain.
What does -nodes mean?
-nodes (no DES) tells openssl to write the private key in plain PEM rather than wrapping it with a passphrase. Web servers like nginx and Apache must read the key on startup, so an encrypted key forces an interactive prompt and prevents unattended reboots. If you need the key encrypted (e.g. backup), drop the -nodes flag and openssl will prompt for a passphrase.
How do I add the SAN extension?
OpenSSL 1.1.1+ supports -addext "subjectAltName=DNS:example.com,DNS:www.example.com" inline. Older versions need a config file with [req_ext] subjectAltName=@alt_names and a matching [alt_names] section. This generator emits both forms — pick whichever your openssl supports (run openssl version).
Where does the openssl command save files?
The -keyout and -out paths are relative to the current working directory of the shell that runs the command. Run the command from the directory you want the key and CSR to land in (often /etc/ssl/private and /etc/ssl/csr respectively). Set restrictive permissions (chmod 600 server.key) immediately after generation.