When you are looking to get an SSL certificate, you will be asked for a CSR (certificate signing request) during the order. In this article we will show you how to generate CSR in cPanel and also no control panel Ubuntu OS. Let’s go!
What is CSR?
CSR is an encoded request to the certificate authority. It contains your public key and some required information for the creation of SSL, like domain name, company name etc.
How to create CSR in cPanel?
- Login to WHM. By default WHM is located at port 2087. For example, https://18.104.22.168:2087
- On the left hand menu find “SSL/TLS“
- Generate an SSL Certificate and Signing Request. Yes, a self-signed SSL will be generated along with CSR. You will not be able to use this SSL on your website, since your visitors will receive security warning.
Fill in the required fields with your company information, like it’s shown on the pictures below.
- Passphrase is not required. Once you filled all the required info, press “Create“.
- You will be directed to the page containing all 3 components – private key, signing request (CSR) and self-signed certificate.
- Copy the content of Signing Request and send it to your SSL vendor.
How to generate CSR in Ubuntu 20.04 (22.04)
Although we will use command line, the process is simple even for not tech-savvy people.
- Login to your server via SSH
- Enter the command below. Replace mydomain with your domain name.
openssl req -new -newkey rsa:2048 -nodes -keyout mydomain.key -out mydomain.csr
- You will be presented with some questions to answer. The process is pretty self-explanatory.
- Country name. 2 letter country code (for example, Panama – PA)
State or province name.
Locality name. City for your company registration (in full)
Organization name. Name of your company (without any dots)
Organizational Unit Name. You can enter the name of your department, like “Hosting Support”
Common name. Your domain name (ex. buydomainwithbtc.com)
- CSR generation has been completed.
Location of CSR in Ubuntu 20.04/22.04
CSR will be created and put in the directory from where you initiated the command. After you completed the previous steps, simply enter.
You will see both .csr and .key files.
To copy, open it with any editor, like nano.
Make sure to copy it with both starting and ending lines (Begin certificate request/End certificate request).
-----BEGIN CERTIFICATE REQUEST-----
-----END CERTIFICATE REQUEST-----
If you are a yohost.org customer, you can also ask our support team to help you generate CSR. We will help to do it even if your website is not hosted with us.