Contents
One of the most important steps in building a secure website is using an SSL certificate. Before obtaining an SSL certificate, the person or organization requesting the certificate must create a Certificate Signing Request (CSR). A CSR is a request file to be submitted to the certificate provider (Certificate Authority – CA) and contains information about the requested certificate. In this article, we explain in detail what a CSR is, how it is created and why it is important.
What Is a CSR?
A CSR is an encoded file created to obtain an SSL/TLS certificate for a web server or device. The CSR file contains the public key, and this key is signed by the certificate authority (CA) to create the certificate. The private key used in this process is kept on the server and must never be shared with anyone.
Information Included in a CSR File
Certain information must be entered when creating a CSR. Here is the basic information your CSR file must contain:
- Common Name (CN)
This field must be the same as the fully qualified domain name (FQDN) the SSL certificate will be bound to. For example, an entry likewww.siteadiniz.comshould be made. If you want to get a Wildcard SSL Certificate, you should specify the domain name as*.siteadiniz.com. - Organization (O)
The full legal name of your company or organization must be written in this field. Abbreviations and incomplete names should not be used. The company type must be specified (for example: “XYZ Technology Inc.”). If you are getting an individual certificate, you can also use your personal name. - Organizational Unit (OU)
Used to specify the relevant department within the company. For example: “Information Technology Department” or “Security Team”. - Locality (L)
You must enter the city where your company is located. For example: “Istanbul”. - State or Province (ST)
You must specify the province or region where your company is located. For example: “Istanbul” or “Ankara”. - Country (C)
It must be specified with the two-letter country code. “TR” should be used for Türkiye. - Email Address
The email address to which notifications about the certificate request will be sent must be written in this field. For example: “webmaster@siteadiniz.com“.
Key Length and Security
The length of the encryption key used when creating a CSR is of great importance for security. A 2048-bit key is accepted as the industry standard today and offers a secure structure. Keys with lower bit values are not recommended because they are more likely to be broken.
Signature Algorithm
The signature algorithm is used by the certificate authority to sign and verify certificates. Using a secure algorithm ensures your system is protected against attacks. The most secure and widely used signature algorithm today is known as SHA-2.
The Importance of the Private Key
When you create the CSR file, your system also generates a private key. This private key must be kept secret and must not be shared with third parties in any way. Your private key is used to:
- Enable encrypted communication on your web server.
- Prevent data from being read by third parties.
- Maintain data integrity in SSL/TLS connections.
If the private key is lost or falls into the hands of unauthorized persons, your website's security is seriously endangered. In such a case, you must create a new key pair and reissue the certificate.
Sample CSR Format
Most CSR files are created in PEM format and include header and footer lines like the following:
-----BEGIN CERTIFICATE REQUEST-----
MIIDGDCCAgACAQAwgakxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
MRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRYwFAYDVQQKEw1Hb29nbGUsIEluYy4g
MRcwFQYDVQQLEw5JVCBEZXB0YXJ0bWVudDEXMBUGA1UEAxMOd3d3Lmdvb2dsZS5j
b20xIzAhBgkqhkiG9w0BCQEWFHdlYm1hc3RlckBnb29nbGUuY29tMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq3NT5DBBDql5gTB4/6Zsq/C1iwO4yBD2
nThaNfO1qHKUjnFz0oua+54x97TjmHItRH5H+jPJvmzzb4TUJ274CRFhquOOMZVM
dVIG9FUjogJstMqv4GtBC4C/ype0ilAcPEBjRi9bFiR/g43qPCnlRAJNo4cJko7n
W7erAJsRPNiQMr5UJN9h3GuQMPw6uaI/0OWuWjSTLzEBMujHhPySgZIv1SurVXDz
iFC6S6qvc9XQ1z6tkmrttdoOfDI+eT75QxysHmctgAvkZaFEoRASqcqf3iYyl9Qw
mh0xuLSoR9HTvaD9DhxAIa4/1+l6D9MGb/01+lip7AjqdnTTzSBfcQIDAQABoCkw
JwYJKoZIhvcNAQkOMRowGDAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DANBgkqhkiG
9w0BAQsFAAOCAQEAZyMkFtElkS3vQoCPVHevrFcPgrx/Fqx0UdQdnf2RyoJ3jqiU
yPo5+5BHA9kY0TuJLhgMIq0QWAbzZYNL0+J8UUcx8EvMK6DqPpKteyYFCMw6GEzu
diq4RE/8Ea9UpGbw8GH1oEsUksBTwrs06OSOVgDXkJ1XY4VaRkMPflgQWGULgKYO
2P/zcFowENruGLJO7ynyUkm5idKdYzDqk7c7bqyLywOEPxSRKVyblmzqiFCOlCqp
HozZ9+5TmrMPD/hO1uHVECcL08RMGXoGMajojI8CE+cmkaWLq3PZt08Sv0F/Itop
O8XAZ2bYTK4HQfPm+Fud22SD+DkSwt8vN8Lu2g==
-----END CERTIFICATE REQUEST-----
You can use CSR Decoder tools to verify the contents of your CSR file and see whether there are any errors. For example, if you are getting a Wildcard SSL Certificate, you must enter *.siteadiniz.com instead of www.siteadiniz.com. The certificate creation process may fail because of an incorrectly entered domain name.
Steps to Create a CSR and an SSL Certificate
You can follow the steps below to create a CSR and obtain an SSL certificate:
- Create the CSR on your server (e.g., using OpenSSL, IIS, cPanel or WHM).
- Submit your CSR file to an SSL provider.
- Install the SSL certificate from the certificate authority on your server.
- Test your site's SSL/TLS configuration.
If you need more information about the CSR creation process, you can review the CSR creation guides suitable for your server or get technical support.
Conclusion
A CSR is a mandatory step for obtaining an SSL certificate and must be created correctly. You can create a secure CSR by using an accurate domain name, a strong encryption key and the SHA-2 signature algorithm. Remember to store your private key securely and check your CSR file with verification tools when necessary. Your website's security depends on a correct CSR and SSL certificate process!
Was this article helpful?
Thank you for your feedback.
Still stuck? Our support team is here to help. Tell us your question and our experts will help you.


