Skip to content

XPASS Digital Services

How to create a CSR and keep your private key safe

A CSR is the one piece of information you send to get an SSL certificate. This guide shows how to create it, what to type in each field and what to do with the files.

Last updated:

Quick answers

What is a CSR?
A block of text containing your public key and your domain name, which you send to the certificate authority when ordering.
Who creates it?
You, on your own server or in your hosting panel. XPASS does not create CSRs for you.
What do I do with the private key?
Keep it on your server, protected, and never send it to anyone. XPASS never asks for or stores it.
What name goes in Common Name?
The exact domain the certificate is for, such as www.example.com. For a Wildcard, write *.example.com.

What is a CSR?

A Certificate Signing Request is a text file that asks a certificate authority to sign a certificate for your domain. It carries your public key and the name, and never your private key.

1Generate a private keyOn your server. This stays with you.2Create the CSRA text request made from that key.3Submit the CSRThis is the only part you send.4Install the certificateIt pairs with the key you kept.
The private key never leaves your server.

The CSR and the private key are made as a pair. The certificate you receive works only with the private key from the same pair, so keep them together.

Before you start

Decide the exact name the certificate must cover, and for OV have your organisation's legal details ready. The CSR cannot be edited later; a wrong name means a new CSR.

  • Exact domain, for example www.example.com or example.com. Match what visitors type.
  • For a Wildcard, the name is *.example.com.
  • For OV, the organisation's exact legal name, city, region and two-letter country code.
  • A secure place to store the private key, such as a password manager or an encrypted backup.

Create a CSR with OpenSSL

On a server with OpenSSL, one command creates the private key and the CSR together. You then send only the CSR file.

  1. Open a terminal on your server.
  2. Run: openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.csr
  3. Answer the questions. Common Name is the domain. Leave the challenge password empty.
  4. You now have example.com.key (private, keep it) and example.com.csr (send it).
  5. Open the CSR file in a text editor and copy all of it, including the BEGIN and END lines.

The -nodes option leaves the key file without a passphrase so a web server can start unattended. Protect the file with strict permissions instead.

Create a CSR in a hosting panel

Most hosting panels have a Generate CSR page. Fill in the same fields and the panel stores the private key for you.

Look for a section named SSL, Security or Certificates. Choose to generate a CSR, enter the domain and organisation details, and copy the text it shows. If the panel installs certificates itself, it keeps the key and pairs it with the certificate once you paste it back in.

If your hosting company manages certificates for you, ask them whether they accept a certificate bought elsewhere and how they want the CSR made.

What to type in each field

Common Name matters most. Other fields matter for OV; for DV the authority mostly ignores them.

CSR fields
FieldWhat to enterNote
Common NameThe exact domain, or *.example.com for a WildcardMust match the name you order.
OrganisationYour legal organisation nameFor OV it must match official records.
City and regionWhere the organisation is registeredSpell them in full.
CountryTwo-letter code, for example THUse the code, not the full country name.
Email and challenge passwordLeave empty unless askedNot needed for ordering.

Keeping the private key safe

Store the private key only on your server and in one secure backup. Do not email it, paste it in chat or upload it anywhere. XPASS never asks for it.

  • Set file permissions so only the web server account can read it.
  • Keep one encrypted backup. Without the key, the certificate is useless.
  • Never send it by email or chat, not even to support staff.
  • If you think it was exposed, create a new key and CSR and reissue the certificate.

Common mistakes

Most CSR problems are the wrong name, a lost key or a pasted CSR with missing lines. All are easy to fix with a new CSR.

Mistakes and fixes
MistakeResultFix
Wrong Common NameCertificate does not match the siteCreate a new CSR with the right name and reissue.
Lost private keyCertificate cannot be installedCreate a new key and CSR, then reissue.
Copied without BEGIN or END linesThe order rejects the CSRCopy the whole file again.
Used a different key at installServer errors about key mismatchInstall the key that belongs to that CSR.

When the certificate is issued, follow the installation steps on the SSL page.

Frequently asked questions

What is a CSR?

A text request containing your public key and domain name that you submit to a certificate authority to get a certificate.

Does a CSR contain my private key?

No. The CSR carries only the public key. The private key stays on your server.

Does XPASS ask for my private key?

Never. XPASS does not ask for or store private keys. If anyone asks for yours, do not send it.

Can XPASS generate the CSR for me?

No. You generate it so that the private key is created and stays on your side.

What key size should I use?

2048-bit RSA is the common minimum for public certificates. Your server or panel may offer larger sizes or other key types.

What do I put in Common Name for a Wildcard?

Write *.example.com, with the asterisk and a dot before your domain.

Can I change the CSR after I submit it?

No. If the name is wrong, create a new CSR and reissue the certificate.

I lost my private key. What now?

Create a new private key and CSR, then ask for a reissue. The old certificate cannot be used without its key.

Do I need a passphrase on the key?

It is optional. A passphrase adds protection but the server then needs it at every start. Strict file permissions are a common alternative.

Is the email field required?

No. Leave it empty unless the form asks for it.

Which country format do I use?

The two-letter code, such as TH for Thailand.

Where do I install the certificate afterwards?

On the same server that holds the private key, using the steps on the SSL page.

About XPASS and this service

XPASS is a reseller of SSL certificates issued by Sectigo (formerly Comodo CA). You create the CSR and keep the private key; XPASS never asks for or stores your private key.

Still have a question?

Send it to our support team and we will help you before you buy.

Contact support

How to create a CSR for an SSL certificate · XPASS VPN