What Is a CSR?
A certificate signing request (CSR) is the file you send to a certificate authority (CA) to get an SSL/TLS certificate. It contains your public key, the domain names the certificate should cover, and optional company details, all signed with the matching private key to prove you hold it.
Generating a CSR always creates two files: the CSR, which you paste into the CA's order form, and the private key, which stays on your server. The CA signs your public key and sends back a certificate that only works together with that key.

How to Generate a CSR
Type the main domain as the common name, such as example.com, or *.example.com for a wildcard certificate.
List any extra domains or subdomains the certificate should cover. The www version is added for you unless you untick it.
RSA 2048 works everywhere. ECDSA P-256 is smaller and faster and is supported by all modern browsers and servers.
Download both files. Paste the CSR into your CA's order form and keep the .key file safe: you'll need it to install the certificate.
Advertisement
What to Put in Each CSR Field
The main domain, exactly as visitors type it: example.com or *.example.com. No https:// and no path.
Every name the certificate must cover. Browsers only check SANs, not the common name, so the generator always includes the CN here too.
Your legal company name, city, state and country. Domain-validated (DV) certificates ignore them; organization- and extended-validated ones check them.
The two-letter ISO code, such as US, GB or DE. Full country names make the CSR invalid at most CAs.
Public CAs stopped including OU in certificates in September 2022, so most of them reject or ignore it.
Rarely needed. Some CAs drop it from the certificate entirely.
RSA or ECDSA: Which Key Should You Use?
The safe choice: accepted by every CA, server and client, including old ones.
Larger keys are slower for every TLS handshake. Use them only if your policy requires it.
Similar strength to RSA 3072 with a much smaller key and faster handshakes. Supported by all modern browsers and servers.
For stricter policies. Slightly slower than P-256, still far lighter than RSA 4096.
Advertisement
Keep Your Private Key Safe
Never send the private key to anyone, including your certificate authority. A CA only ever needs the CSR.
Save it before you leave the page. It exists only in your browser, and we can't recover it. Without it, the certificate is useless.
Store it with tight permissions on the server, for example
chmod 600 example.com.key, readable only by the web server.Use a new key for each request. If a key may have leaked, generate a fresh CSR and have the certificate reissued.
Certificates are getting shorter. Public TLS certificates have been limited to 200 days since March 2026, and the limit keeps shrinking, so automating renewal with ACME (for example Certbot) saves time.
Useful OpenSSL Commands for CSRs
Check your files on the command line before and after the certificate arrives:
openssl req -in example.com.csr -noout -text -verifyopenssl req -in example.com.csr -noout -pubkey | openssl sha256
openssl pkey -in example.com.key -pubout | openssl sha256openssl pkcs12 -export -out example.com.pfx -inkey example.com.key -in example.com.crt -certfile ca-bundle.crtAdvertisement
More SSL and Certificate Tools
After your certificate is issued, check it with these free tools: