Aisha atique
Aisha atique

Reputation: 611

Can I certify website without domain name?

Is it possible to do self signed certification a website without domain name? I have read that let'sencrypt.org does not issue certificate for having no domain name.

Upvotes: 27

Views: 42190

Answers (2)

Nikil Munireddy
Nikil Munireddy

Reputation: 328

self-sign the certificates

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

by running this command two files are created cert.pem and key.pem, in this process it will ask few questions which are necessary to create certificate. Since we have passed days argument as 365, it is valid for another one year.

Use the key files to certify ip example: 127.0.0.1 or 54.198.xx.xx (EC2 instance IP)

The certificate generated is of x509 standard

Upvotes: 14

Tobias K.
Tobias K.

Reputation: 3092

If you want a certificate from LetsEncrypt that would be trusted by most browsers you need a domain that resolves to your server. LetsEncrypt does not issue certs for IP addresses nor for custom dev-domains like .local.

You can of course create and sign a certificate yourself, for every domain name you want, or even for IP addresses. The domain name can be anything, and doesn't necessarily be the one you use to access the site. The webserver won't mind. Your browser will display a lot of warnings, though (CN mismatch, non-trusted signature-path), but if you skip/ignore those you can access your site via HTTPS.

For local development certificates there also is the tool mkcert, which even makes your browser trust them by adding a local CA.

Upvotes: 22

Related Questions