What Is a CSR in SSL?
A CSR, or Certificate Signing Request, is the file you create on your server and send to a certificate authority when you ask for an SSL certificate. It carries your public key and the name you want covered, and the CA builds the certificate from it. The private key stays on the server and never goes in the CSR.
CSR in SSL: what the file contains
| Field | Example | Notes |
|---|---|---|
| Common Name (CN) | example.com | Legacy field; browsers use SAN |
| Subject Alternative Names | example.com, www.example.com | The names that count |
| Organization, locality, country | Example Ltd, Cairo, EG | Used for OV and EV |
| Public key | RSA or ECDSA key | Matches your private key |
| Signature | Signed with your private key | Proves you hold the key |
Domain validated certificates ignore most of the organization fields. The CA takes the names from the request or from your order.
Create a key and CSR
openssl req -new -newkey rsa:2048 -nodes \
-keyout example.key -out example.csr \
-subj "/C=US/O=Example Ltd/CN=example.com" \
-addext "subjectAltName=DNS:example.com,DNS:www.example.com"
The -addext flag needs OpenSSL 1.1.1 or newer. On older versions, use a config file with a subjectAltName entry. The private key example.key stays on your server. Only the CSR goes to the CA.
Inspect a CSR in SSL
openssl req -in example.csr -noout -text | head -30
Check that the names are right before you submit. A wrong name means a wrong certificate and a reissue.
Do you need a CSR for a free certificate?
With ACME clients such as Certbot, the client builds the CSR for you. You never handle it. You need to create one by hand mainly when you buy a certificate from a commercial CA, when you use a web form that accepts uploads, or when your hosting panel asks for one.
After the CA signs
- The CA returns your certificate, and usually the intermediates.
- Combine them in the right order, leaf first.
- Install the files and the private key on the server.
- Reload and test.
Make sure the key matches the issued certificate, using the key pair matcher guide. A very common failure is generating a second CSR with a new key and installing the certificate with the old key.
Reuse and renewal
Each renewal can use a new key and CSR, which is the safer habit. If you reuse a CSR, you reuse the same public key. Some CAs allow it. Generating a fresh pair costs nothing and limits damage from an old leak.
Java and Windows notes
- Java tools such as keytool create a CSR from a key inside a keystore. See converting PEM to a keystore and installing SSL on Tomcat.
- Windows IIS creates CSRs from its certificate wizard and expects the signed file back on the same machine, which holds the key.
- Some hosts generate the CSR for you and do not give you the key. See free SSL versus hosting provider SSL.
Summary
A CSR is your request, a signed statement of the names and public key you want certified. Create it carefully, keep the private key private, and check the names before you send it. Compare CAs in our free CA comparison.
Related reading: what the CA returns, the identity check that follows and the identity check that follows the request.
Frequently Asked Questions
Is a CSR secret?
No. It contains only public information and is safe to send to a CA. The private key is the secret part.
Why does my CSR show the wrong name?
The name in the Common Name or SAN field is what the CA will use. Fix it and generate a new CSR. You do not need a new key, though a new key is a good habit.
Can I edit a CSR?
No. It is signed. Create a new one.
What key size should I use?
RSA 2048 is a common baseline, and ECDSA P-256 is widely supported. Check your CA's current requirements, because minimums can change.
Typical failure modes
- A CSR with only a Common Name when the CA expects names in the SAN field.
- A CSR created on a laptop, with the key left there, then a certificate installed on the server.
- A typo in the domain name that is noticed only after issuance.
- A CSR with an unsupported key size or type for the product.
Inspect the CSR before you submit it, and keep the key file with the CSR file name so they stay together.
Is a CSR the same as a certificate?
No. A CSR is a request you generate, and a certificate is what the CA issues back after checking the name. The CSR is never installed on the server; only the certificate and its chain are.
What happens if I lose the CSR?
Nothing. You can generate a new key and a new CSR and request the certificate again. What you must keep is the private key that matches the certificate you are using, because a certificate without its key is useless.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.