For twenty years, getting a certificate started with the same command: creating a CSR. You pasted it into the certificate authority’s form, and the certificate came back by email.
Today, many teams manage hundreds of certificates without ever having seen one. Yet the CSR has not gone away: it is still there, at every issuance. It is simply made by a program. And there are still cases where creating it is up to you.
What a CSR is
CSR stands for Certificate Signing Request. It is a small file you hand to a certificate authority to say: “here is my public key and the names I want to protect, sign them”.
- Your public key
- The requested names:
www.example.com,example.com - A signature made with your private key
- The private key
- The validity dates
- The authority’s name
Each of the three items has a role:
- The public key is what the authority will certify. It forms a pair with the private key, which stays with you.
- The requested names will become the certificate’s names. They go in the Subject Alternative Name (SAN) extension: that is what browsers read, not the “common name” (CN) field.
- The signature proves that whoever sends the request really holds the matching private key. Without it, anyone could request a certificate for someone else’s public key.
A CSR is not a secret. It contains nothing that would let someone impersonate your site, and it can travel by email or through a portal. That is the whole point.
What it is for: getting the key signed without showing it
The certificate must be signed by the authority, but the private key must never leave your server. The CSR resolves that contradiction: it carries only the public half.
- 1. Generates the key pair. The private key stays here
- 2. Creates the CSR: public key and names, signed with the private key
- 3. Sends the CSR
- 4. Checks the CSR’s signature, and that you control the requested names
- 5. Adds the dates and its name, then signs: that is the certificate
- 6. Returns the certificate
- 7. The certificate is installed next to the private key, which never left the server
Step 4 has two separate parts. The CSR’s signature proves you hold the key. It does not prove the domain is yours: for that, the authority performs a domain validation, over DNS or HTTP.
An example by hand
Three commands are enough, run on the server that will use the certificate.
# 1. The private key (it will not leave this machine)
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out www.example.com.key
# 2. The CSR: the public key and the names, signed with the private key
openssl req -new -key www.example.com.key -out www.example.com.csr \
-subj "/CN=www.example.com" \
-addext "subjectAltName=DNS:www.example.com,DNS:example.com"
# 3. Read the request back before sending it
openssl req -in www.example.com.csr -noout -text -verify
The third command shows what the authority will receive:
Certificate request self-signature verify OK
Certificate Request:
Subject: CN=www.example.com
Subject Public Key Info:
Public Key Algorithm: id-ecPublicKey
Public-Key: (256 bit)
Requested Extensions:
X509v3 Subject Alternative Name:
DNS:www.example.com, DNS:example.com
Signature Algorithm: ecdsa-with-SHA256
The file itself is text, recognisable by its first line:
-----BEGIN CERTIFICATE REQUEST-----
MIIBDjCBtgIBADAaMRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20wWTATBgcqhkjO…
-----END CERTIFICATE REQUEST-----
That is the .csr file you send. The .key file goes nowhere.
Why you no longer hear about it
Because the CSR is now created, sent and discarded by a program, at every renewal, without anyone seeing it.
openssl req- You generate the key
- You create the CSR
- You submit it on the authority’s portal
- You install the certificate
Certbot, acme.sh, Caddy, cert-manager- The client generates the key
- It creates the CSR and sends it
- It installs the certificate
- It starts again before expiry
AWS ACM, CDN, hosting provider- The provider does everything
- You see neither the key nor the CSR
- You only give the domain name
Three changes took it out of daily work:
- The ACME protocol. In ACME, the last step of an order is precisely to send a CSR to the authority. The client builds it itself. On Kubernetes, cert-manager even stores it in a resource of its own,
CertificateRequest, which almost nobody reads. - Cloud-managed certificates. With AWS Certificate Manager, a CDN or a hosting provider, you request a certificate for a domain name. The key and the CSR are created on the provider’s side.
- Shorter and shorter lifetimes. With certificates at 47 days in 2029, that is eight renewals a year, nobody can type
openssl reqfor each certificate any more. The manual step was bound to disappear.
The result: for a public website, the CSR has become an internal detail, like the TLS handshake. You know it happens, you no longer look at it.
The cases where the CSR still matters
As soon as an issuance is not automated end to end, the CSR is your business again. These are often the most sensitive certificates.
| Case | Who creates the CSR | Who signs it | What to watch |
|---|---|---|---|
| OV or EV certificate ordered on a paid authority’s portal | You | The public authority | It replaces the organisation fields with the ones it verified |
| mTLS with a provider | You, for your client certificate | The provider’s authority | Send the CSR, never the key |
| Internal authority of the company (AD CS, Vault, step-ca) | The team requesting the certificate | The PKI team | Follow the imposed template: names, usages, key size |
| Appliance: firewall, load balancer, storage array, printer | The appliance, from its interface | Your authority, public or internal | Do not regenerate a CSR before installing the certificate |
| Key in a hardware module (HSM, KMS, smart card) | The module, or the tool driving it | Depends on the use | The CSR is the only thing that leaves the module |
| Intermediate authority | The future intermediate authority | The root authority | A ceremony, not a script |
Example 1: a client certificate for a provider
Your application has to call a bank’s API over mTLS. The bank signs its customers’ certificates itself. You generate the key on your gateway, then a CSR with the agreed name:
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out client-bank-x.key
openssl req -new -key client-bank-x.key -out client-bank-x.csr \
-subj "/O=Example Ltd/CN=client-example-prod"
You upload client-bank-x.csr to the bank’s portal. It returns client-bank-x.crt. No exchange carried a secret, and the bank will never be able to impersonate you.
If a provider offers to generate the key for you and send it over “to save time”, decline: a key that has travelled is no longer private.
Example 2: a network appliance
On a firewall or a load balancer, the key is created inside the appliance and often cannot be exported from it. The administration interface offers a “Generate CSR” button. You download the request, have it signed, then import the certificate in the same place.
The trap is well known: if someone clicks “Generate CSR” again before the import, the appliance creates a new key. The certificate being signed then matches the old one, and it will be rejected on import.
Example 3: the internal authority
In a company with its own authority, a team that needs a certificate for an internal service sends a CSR to the PKI team, through a portal or a ticket. The PKI team checks that the request follows the rules (allowed names, algorithm, lifetime) and signs.
Recent tools, such as HashiCorp Vault or step-ca, automate this step too, sometimes with ACME. The CSR then becomes invisible again, internally as on the Internet.
The most common mistakes
- Generating the key anywhere other than on the server. On a workstation, the key will have to travel. On an “online CSR generator”, it is created by a third-party site, which has therefore seen it.
- Sending the key along with the CSR. Out of habit, both files get attached to the ticket. Only the
.csrshould leave. - Forgetting the names in the SAN. A name present only in the CN is ignored by browsers. Every name must appear in
subjectAltName. - Reusing the same CSR at every renewal. It is convenient, and it amounts to keeping the same private key for years. A new key and a new CSR at each renewal limit the effects of a past leak.
- Choosing a key that is too weak. The accepted minimum is RSA 2048 bits; ECDSA P-256 is shorter and faster.
- Losing the key between the request and the delivery. A certificate without its private key is useless: you have to start over.
- Assuming the authority copies the CSR. It may ignore or replace whatever it has not verified: organisation name, city, requested usages.
What this changes for tracking your certificates
The CSR says something about the certificate’s future: a certificate born from a hand-made CSR will be renewed by hand. No program will do it for you, and it is the one that will expire one day without warning.
These certificates are also the least visible. An mTLS client certificate, the one on an internal appliance or an intermediate authority’s appear neither in a scan of your sites nor in Certificate Transparency logs.
PkiZen does not create CSRs and never sees your keys: that is a choice. It tracks the result. Once the certificate arrives, you import its public part, and you write down what will be missing at the next renewal:
- where the key is, hence where to generate the next CSR;
- who to send it to: the portal, the contact, the usual lead time;
- when to start: a reminder set to that lead time, 60 days for a provider rather than 7.
In summary
- A CSR contains your public key, the requested names and a signature. It gets a certificate signed without ever showing the private key.
- It still exists, at every issuance. Automation (ACME, cloud) creates and sends it for you, which is why it faded from view.
- It remains your job for OV and EV certificates, mTLS with a provider, internal authorities, appliances and hardware-held keys.
- The rule does not change: the key first, where it will be used; the CSR next; and only the CSR travels.
- A certificate obtained through a manual CSR is renewed by hand: that is the one to put in the inventory with a reminder.