This question already has an answer here:

I tried Googling and haven't been able to find anything reliable that shows me how to generate the CSR. I have multiple domains, that I'd like added so I can't use the usual OpenSSL wizard:


How can I get this generated?

marked as duplicate by Ward, masegaloeh, MadHatter, Jenny D, Grant May 26 '15 at 0:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


As per your requirements, you want to secure multiple domains and its unlimited numbers of sub-domains. You can do it with multi domain wildcard certificate. To generate CSR using OpenSSL wizard, you have to follow below steps.

Login into your server.

Create an OpenSSL configuration file named san.cnf using the following information.

[ req ]
default_bits       = 2048
distinguished_name = req_distinguished_name
req_extensions     = req_ext
[ req_distinguished_name ]
countryName         = Country Name (2 letter code)
stateOrProvinceName = State or Province Name (full name)
localityName        = Locality Name (eg, city)
organizationName    = Organization Name (eg, company)
commonName          = Common Name (e.g. server FQDN or YOUR name)
[ req_ext ]
subjectAltName = @alt_names
DNS.1 = domain.com
DNS.2 = *.domain2.com
DNS.3 = *.domain3.com
DNS.4 = *.domain4.com

Note: Change or add additional DNS names as per your requirements.

Save the file and run the following OpenSSL command to create the Certificate Signing Request and a new Key file.

openssl req -out sslcert.csr -newkey rsa:2048 -nodes -keyout private.key -config san.cnf

Now you have CSR file “domain.csr” and send it to your certification authority so they will issue a certificate with SAN.

  • This will depend on the reseller. Some will require the SAN to be contained within the CSR. – Jenny D May 25 '15 at 12:53
  • Also, an SSL cert for *.example.org will not be valid for example.org. You would need to specify both. – Jenny D May 25 '15 at 12:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.