A certificate signing request (CSR) is a block of encoded text that contains information about your organization and your public key. You submit it to a certificate authority (CA) to apply for an SSL/TLS certificate.
When you create a CSR, you generate a private key and a corresponding public key. The CSR contains the public key and information about your organization, such as your domain name, company name, and location. The CA uses this information to verify your identity and issue a certificate that binds your organization's details to your public key.
A CSR typically includes:
CSRs are used primarily to secure websites with SSL/TLS certificates. These certificates encrypt data transmitted between a user's browser and a website's server, ensuring secure communication. Organizations use CSRs to apply for certificates from trusted CAs like DigiCert, GlobalSign, or Let's Encrypt.
Many people confuse CSRs with SSL certificates themselves. A CSR is merely a request for a certificate, not the certificate itself. Another misconception is that CSRs contain sensitive information. While they do include your public key and organizational details, they do not contain your private key, which must remain secure.
To generate a CSR, follow these steps using OpenSSL, a widely used tool for creating CSRs:
openssl req -new -newkey rsa:2048 -nodes -keyout mydomain.key -out mydomain.csr
After the CA verifies your information, they will issue an SSL certificate that you can install on your web server.