Can a CSR Be Created Without a Fully Qualified Domain Name?

csrdomain-namefqdnopensslssl-certificate

My client has an Ubuntu server hosted by Digital Ocean. The server has no domain name, we access it via the public IP address. They want to start using https and provided me with a SSL certificate from GoDaddy.com. I need to provide GoDaddy with a CSR to set up the SSL certificate.

My attempt to create a CSR and private key on the server:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365

The problem is I have nothing to put for the Common Name (eg, fully qualified host name) []: prompt. Is it ok to simply put the IP address instead?

While researching this, I have come across Subject Alternative Names (SAN) that can specify IP addresses, but I'm not sure how to add that to the CSR.

Do I need to tell my client they should get a domain name?

Best Answer

You can, but you shouldn't as you are obviously discussing DV-certificates here.

A certificate identify "something". That something can be an organization, an individual, a website, an email address, an IP address, a piece of code, etc.

If you are creating certificates to be used in the HTTPS world you need to have a DNS name in the certificate, in the SAN section. You should not use HTTPS URLs with IP addresses in the hostname part because, even if can technically work, and you can have certificates with IP addresses instead of names, they have to be generated differently and you will have far more troubles finding a CA to sign them.

You should register a domain name, anyone, and then use that as a suffix to name all your hosts, and you solve your problem they way it should be done: all hosts now have a name, and hence you can create a proper certificate for that name.