{"id":8317,"date":"2026-11-21T18:12:36","date_gmt":"2026-11-21T18:12:36","guid":{"rendered":"https:\/\/cloudvpshosts.com\/kb\/?p=8317"},"modified":"2026-11-26T14:30:12","modified_gmt":"2026-11-26T14:30:12","slug":"how-to-generate-a-csr-for-your-ssl-certificate","status":"publish","type":"post","link":"https:\/\/cloudvpshosts.com\/kb\/how-to-generate-a-csr-for-your-ssl-certificate\/","title":{"rendered":"How to Generate a CSR for Your SSL Certificate (Linux and Windows)"},"content":{"rendered":"<p>A CSR (certificate signing request) is a small block of encoded text that holds your domain name, your organization details and a public key. You generate a CSR on your own server, paste it into your SSL order, and DigiCert uses it to issue your certificate. The matching private key never leaves your server.<\/p>\n<p>This guide is for Cloud VPS Hosts customers who ordered a RapidSSL, GeoTrust or DigiCert certificate for a website running on a VPS or dedicated server. By the end you will have a CSR ready to paste into your order and a private key saved where your web server can use it.<\/p>\n<h2>What do you need before you generate a CSR?<\/h2>\n<p>You need command line or desktop access to the server that will host the website, and the exact domain name the certificate will protect.<\/p>\n<ul>\n<li>SSH access as root or a sudo user for Linux servers. If you have not set this up yet, see <a href=\"https:\/\/cloudvpshosts.com\/kb\/setting-up-an-ssh-key\/\">Setting up an SSH key<\/a>.<\/li>\n<li>An RDP session with administrator rights for Windows servers. Our guide on <a href=\"https:\/\/cloudvpshosts.com\/kb\/understanding-rdp-in-windows-vps-how-it-works-and-why-it-matters\/\">RDP on a Windows VPS<\/a> covers connecting.<\/li>\n<li>The domain name exactly as visitors will type it, for example <code>www.example.com<\/code> or <code>example.com<\/code>. For a Wildcard certificate, use <code>*.example.com<\/code>.<\/li>\n<li>For OV and EV certificates, your organization&#8217;s legal name, city, state or region and country, written exactly as they appear in official registration records. DigiCert checks these details.<\/li>\n<\/ul>\n<h2>Which details go into a CSR?<\/h2>\n<p>Every CSR contains the same handful of fields. The Common Name is the one that matters most, because the certificate is issued for that name.<\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>What to enter<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Common Name (CN)<\/td>\n<td>The domain the certificate will protect<\/td>\n<td>www.example.com<\/td>\n<\/tr>\n<tr>\n<td>Organization (O)<\/td>\n<td>Your legal business name. For DV certificates any name, or your own name, is fine.<\/td>\n<td>Example Ltd<\/td>\n<\/tr>\n<tr>\n<td>Organizational Unit (OU)<\/td>\n<td>Leave blank. Public CAs no longer include this field in certificates.<\/td>\n<td>(blank)<\/td>\n<\/tr>\n<tr>\n<td>City or Locality (L)<\/td>\n<td>City where the organization is registered<\/td>\n<td>Berlin<\/td>\n<\/tr>\n<tr>\n<td>State or Province (ST)<\/td>\n<td>Full name, not an abbreviation<\/td>\n<td>Berlin<\/td>\n<\/tr>\n<tr>\n<td>Country (C)<\/td>\n<td>Two-letter ISO country code<\/td>\n<td>DE<\/td>\n<\/tr>\n<tr>\n<td>Key size<\/td>\n<td>RSA 2048 bits or higher<\/td>\n<td>2048<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How do you generate a CSR on Linux with OpenSSL?<\/h2>\n<p>On Ubuntu, Debian, AlmaLinux and most other distributions, one OpenSSL command creates both the private key and the CSR. OpenSSL is installed by default on our Linux images.<\/p>\n<h3>1. Create a folder for the key<\/h3>\n<p>Keep the private key in a folder only root can read:<\/p>\n<pre><code>sudo mkdir -p \/etc\/ssl\/private\r\nsudo chmod 700 \/etc\/ssl\/private\r\ncd \/etc\/ssl\/private<\/code><\/pre>\n<h3>2. Run the OpenSSL command<\/h3>\n<p>Replace <code>example.com<\/code> with your own domain in both file names:<\/p>\n<pre><code>sudo openssl req -new -newkey rsa:2048 -nodes \\\r\n  -keyout example.com.key \\\r\n  -out example.com.csr<\/code><\/pre>\n<p>OpenSSL then asks for each field from the table above. Type the values and press Enter after each one. When it asks for &#8220;A challenge password&#8221; and &#8220;An optional company name&#8221;, press Enter to leave them empty.<\/p>\n<p>If you prefer to skip the prompts, you can pass every field in one line:<\/p>\n<pre><code>sudo openssl req -new -newkey rsa:2048 -nodes \\\r\n  -keyout example.com.key -out example.com.csr \\\r\n  -subj \"\/C=DE\/ST=Berlin\/L=Berlin\/O=Example Ltd\/CN=www.example.com\"<\/code><\/pre>\n<h3>3. Protect the private key<\/h3>\n<pre><code>sudo chmod 600 \/etc\/ssl\/private\/example.com.key<\/code><\/pre>\n<p>Do not email this file, paste it anywhere or share it with anyone, including our support team. Anyone who has it can impersonate your site.<\/p>\n<h3>4. Display the CSR<\/h3>\n<pre><code>sudo cat \/etc\/ssl\/private\/example.com.csr<\/code><\/pre>\n<p>Copy everything from <code>-----BEGIN CERTIFICATE REQUEST-----<\/code> to <code>-----END CERTIFICATE REQUEST-----<\/code>, including those two lines.<\/p>\n<h3>5. Check the CSR before you submit it<\/h3>\n<p>A typo in the domain means a certificate for the wrong name, so check the content first:<\/p>\n<pre><code>openssl req -in \/etc\/ssl\/private\/example.com.csr -noout -text | grep Subject:<\/code><\/pre>\n<p>The output should show your Common Name and organization details exactly as you intended.<\/p>\n<h2>How do you generate a CSR on Windows Server with IIS?<\/h2>\n<p>On a Windows VPS running IIS, create the CSR in IIS Manager. Windows then keeps the private key in its certificate store, and you never handle a key file yourself.<\/p>\n<ol>\n<li>Open <strong>Server Manager<\/strong>, then <strong>Tools<\/strong> &gt; <strong>Internet Information Services (IIS) Manager<\/strong>.<\/li>\n<li>In the left pane, click the server name. In the middle pane, double-click <strong>Server Certificates<\/strong>.<\/li>\n<li>In the right Actions pane, click <strong>Create Certificate Request<\/strong>.<\/li>\n<li>Fill in the Distinguished Name Properties. &#8220;Common name&#8221; is your domain, for example <code>www.example.com<\/code>. Use the full name of your state or province. Click <strong>Next<\/strong>.<\/li>\n<li>Leave the cryptographic service provider as <strong>Microsoft RSA SChannel Cryptographic Provider<\/strong> and set the bit length to <strong>2048<\/strong>. Click <strong>Next<\/strong>.<\/li>\n<li>Choose a file name such as <code>C:\\ssl\\example.com.csr<\/code> and click <strong>Finish<\/strong>.<\/li>\n<li>Open the file in Notepad and copy the full text, including the BEGIN and END lines.<\/li>\n<\/ol>\n<p>Generate the request on the same server where you will install the certificate. The pending request, and its private key, live in that server&#8217;s certificate store. The <a href=\"https:\/\/cloudvpshosts.com\/kb\/how-to-install-an-ssl-certificate-on-iis-windows-server\/\">IIS installation guide<\/a> picks up from here.<\/p>\n<h2>Where do you paste the CSR in your order?<\/h2>\n<p>Paste the CSR into the SSL configuration form in the Cloud VPS Hosts client area, then choose how you want to prove you control the domain.<\/p>\n<p>After payment, you receive an email with a link to configure your certificate. You can also reach the same form from the client area.<\/p>\n<ol>\n<li>Click the link in the email, or log in to the <a href=\"https:\/\/cloudvpshosts.com\/ClientArea\/\">client area<\/a>, open <strong>Services<\/strong> &gt; <strong>My Services<\/strong> and select your SSL certificate.<\/li>\n<li>Paste the full CSR and select your web server type.<\/li>\n<li>Enter the administrative contact details.<\/li>\n<li>Choose a validation method, then submit.<\/li>\n<\/ol>\n<h2>Which domain validation method should you choose?<\/h2>\n<p>Pick DNS validation if you manage your DNS records. Pick HTTP file validation if the domain already points to your server and serves a website on port 80. Pick email if you can receive mail at an admin address on the domain.<\/p>\n<table>\n<thead>\n<tr>\n<th>Method<\/th>\n<th>What you do<\/th>\n<th>Best when<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>DNS<\/td>\n<td>Add a TXT or CNAME record that DigiCert gives you<\/td>\n<td>You control the domain&#8217;s DNS, and the site may not be live yet<\/td>\n<\/tr>\n<tr>\n<td>HTTP file<\/td>\n<td>Upload a small text file to <code>\/.well-known\/pki-validation\/<\/code> on your site<\/td>\n<td>The domain already points to your server and port 80 is open<\/td>\n<\/tr>\n<tr>\n<td>Email<\/td>\n<td>Click a link sent to an address such as admin@ or webmaster@ your domain<\/td>\n<td>You can receive mail on the domain<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>DV certificates are usually issued within minutes of successful validation. OV certificates take one to three days, and EV certificates typically one to three days, because DigiCert also verifies your organization.<\/p>\n<h2>Next step: install the certificate<\/h2>\n<p>Once DigiCert issues your certificate, install it with the guide for your web server:<\/p>\n<ul>\n<li><a href=\"https:\/\/cloudvpshosts.com\/kb\/how-to-install-an-ssl-certificate-on-nginx-ubuntu-debian\/\">Install an SSL certificate on Nginx (Ubuntu and Debian)<\/a><\/li>\n<li><a href=\"https:\/\/cloudvpshosts.com\/kb\/how-to-install-an-ssl-certificate-on-apache-ubuntu-debian-almalinux\/\">Install an SSL certificate on Apache (Ubuntu, Debian and AlmaLinux)<\/a><\/li>\n<li><a href=\"https:\/\/cloudvpshosts.com\/kb\/how-to-install-an-ssl-certificate-on-iis-windows-server\/\">Install an SSL certificate on IIS (Windows Server)<\/a><\/li>\n<\/ul>\n<p>Still choosing a certificate? Compare <a href=\"https:\/\/cloudvpshosts.com\/ClientArea\/index.php?rp=\/store\/ssl-certificates\">DV, OV, EV and Wildcard SSL certificates<\/a> in our store.<\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>Can I reuse the same CSR when I renew or reissue my certificate?<\/h3>\n<p>You can, but generating a new key and CSR each time is safer. A fresh key limits the damage if an old one was ever exposed. It takes under a minute with the commands above.<\/p>\n<h3>What happens if I lose my private key?<\/h3>\n<p>The certificate cannot be installed without the key that matches it. Generate a new key and CSR, open your certificate in the client area and select <strong>Reissue Certificate<\/strong>. Reissues are free for the life of your certificate.<\/p>\n<h3>Should I use www.example.com or example.com as the Common Name?<\/h3>\n<p>Use the version your visitors use most. For single-domain RapidSSL, GeoTrust and DigiCert certificates, DigiCert normally covers both the www and non-www versions when you order one of them. Check the issued certificate&#8217;s Subject Alternative Names to confirm.<\/p>\n<h3>Do I need a dedicated IP address for SSL?<\/h3>\n<p>No. Modern servers use SNI (Server Name Indication), so several SSL sites can share one IP address on the same server.<\/p>\n<h3>How long is my certificate valid?<\/h3>\n<p>Since March 15, 2026, public SSL certificates can be valid for a maximum of 200 days, and DigiCert issues them for up to 199 days. If you bought one or more years, you reissue the certificate before it expires and install the new one. Reissues are included in your subscription.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create a CSR and private key on Linux or Windows Server, paste it into your SSL order and pick the right domain validation method.<\/p>\n","protected":false},"author":1,"featured_media":8430,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_focuskw":"","rank_math_title":"How to Generate a CSR for an SSL Certificate | CVH","rank_math_description":"Generate a CSR and private key for your RapidSSL, GeoTrust or DigiCert certificate with OpenSSL on Linux or IIS on Windows Server, step by step.","rank_math_focus_keyword":"generate a CSR"},"categories":[69],"tags":[241,243,242,238,239,240],"class_list":["post-8317","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-csr","tag-iis","tag-openssl","tag-ssl","tag-ssl-certificate","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/posts\/8317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/comments?post=8317"}],"version-history":[{"count":1,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/posts\/8317\/revisions"}],"predecessor-version":[{"id":8318,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/posts\/8317\/revisions\/8318"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/media\/8430"}],"wp:attachment":[{"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/media?parent=8317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/categories?post=8317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/tags?post=8317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}