> ## Content Index
> Fetch the complete content index at: https://www.bagz.fr/llms.txt
> Use this file to discover other available public pages before exploring further.

# Generate a CSR with openssl
- URL: https://www.bagz.fr/generate-a-csr-with-openssl/
- Published: 2017-11-21T19:07:07.000Z
- Updated: 2017-11-21T19:07:07.000Z
- Author: bgazui
- Tags: Linux, #Migrated-1790668826633, #wp, #wp-post, #Import 2026-09-29 08:00

Generate a **CSR** (*Certificate Signing Request*) on your server when you want to get a certificate from a certified provider is often a mandatory step, very easy to execute.

Here are the different steps to execute:

1. Create a specific directory where you will put all your filesmkdir sub.domain.com && cd sub.domain.com
2. Generate a private key of 2048 bits openssl genrsa -out sub.domain.com.key 2048
3. Now generate a CSR with openssl and with the private key you just generatedopenssl req -new -sha256 -key sub.domain.com.key -out sub.domain.com.csrMany information will be asked during the creation:Country Name (2 letter code) \[\]:  
State or Province Name (full name) \[\]:  
Locality Name (eg, city) \[\]:  
Organization Name (eg, company) \[\]:  
Organizational Unit Name (eg, section) \[\]:  
Common Name (eg, YOUR name) \[\]:  
Email Address \[\]:  
A challenge password \[\]:  
An optional company name \[\]:
4. You now have your CSR and your private key

It's up to you to get your signed certificate from an official provider using those files.