⚠️ IMPORTANT DISCLAIMER: The tools and scripts on this site are provided "AS IS" for educational purposes.
Review destructive commands before executing. By using this site, you assume all risk and agree to our Full Terms of Service.
Create a CSR or self-signed certificate with the right names
Browsers check only a certificate’s Subject Alternative Names, not the Common Name, so a name missing from that list gets a name-mismatch error. Type the server’s names and pick a key type, and copy commands that make the key and a CSR, or a self-signed certificate, with every name included. The key is made on your own server, never here.
Common questions
How do I create a CSR with Subject Alternative Names?
With OpenSSL 1.1.1 or newer: openssl req -new -newkey rsa:2048 -nodes -keyout example.key -out example.csr -subj "/CN=example.com" -addext "subjectAltName=DNS:example.com,DNS:www.example.com". Older versions need the SANs in a config file passed with -config.
How do I make a self-signed certificate with SANs?
With OpenSSL 1.1.1 or newer: openssl req -x509 -newkey rsa:2048 -nodes -keyout lab.key -out lab.crt -days 365 -subj "/CN=lab.test" -addext "subjectAltName=DNS:lab.test,IP:127.0.0.1". Browsers warn about it until it is trusted on each computer that connects, and Apple devices refuse one valid for more than 825 days.
How do I check what’s inside a CSR?
openssl req -in example.csr -noout -text shows the subject, key type and requested extensions; look for the Subject Alternative Name list. openssl req -in example.csr -noout -verify checks the CSR’s own signature.
RSA or ECDSA?
RSA 2048 works with every client. ECDSA P-256 gives smaller keys and faster TLS handshakes with the same security and is supported by all current browsers and servers. Some old clients and appliances only support RSA, so check before switching.
What does -nodes mean?
“No DES”: the private key is saved without a passphrase, so a web server can start without someone typing it. In OpenSSL 3 the option is called -noenc, and -nodes still works. Protect the key file instead: chmod 600 example.key.
How do I check that a certificate matches my private key?
Compare the public keys: openssl x509 -in cert.pem -noout -pubkey | openssl sha256 and openssl pkey -in example.key -pubout | openssl sha256 must print the same hash. The Certificate Converter checks this for you when you open both files.
Related tools: Certificate Converter · PKI Inspector · SSL Checker · All tools A–Z