Customer Support

  1. Support
  2. CSR Generation Instructions for IIS Server

CSR Generation Instructions for IIS Server

To generate a CSR (Certificate Signing Request) on an IIS Server without using the Windows graphical interface (GUI), follow the steps below.

A CSR is an encrypted request that contains information about your domain and organization and is used for issuing an SSL certificate.

Before You Begin

Make sure that:

  • You have administrative access to the Windows Server.
  • The domain for which the SSL certificate will be issued is hosted, or will be hosted, on this server.
  • The CSR is generated on the same server where the SSL certificate will later be installed.

Important: When a CSR is generated, the corresponding Private Key is automatically created as well. For the SSL certificate to be installed successfully, it must be installed on the same server where the CSR was generated.


Step 1: Create the request.inf File

Open a text editor (Notepad) and paste the following content:

;--- request.inf ---
[Version]
Signature="$Windows NT$"
[NewRequest]
Subject = "CN=www.papaki.com, OU=papaki.com, O=papaki.com, L=Heraklion, S=Crete, C=GR, E=support@papaki.com"
; Key Exchange - for encryption
KeySpec = 1
; 2048 bits minimum, 3072 or 4096 are valid too
KeyLength = 4096
; Needed if you need to export the certificate to another server
Exportable = TRUE
; Indicates a server certificate, not a user certificate
MachineKeySet = TRUE
SMIME = False
UserProtected = FALSE
; Generate a new private key
UseExistingKeySet = FALSE
; RSA key
ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
HashAlgorithm = SHA256
ProviderType = 12
; Standard of CSR's
RequestType = PKCS10
; Digital signatures and encryption
KeyUsage = 0xa0
Silent = True
FriendlyName = "Certificate SHA-256"
[EnhancedKeyUsageExtension]
; Server authentication
OID=1.3.6.1.5.5.7.3.1
;------------------------------


Step 2: Customize the CSR Information

Modify the following line:

Subject = "CN=www.papaki.com, OU=papaki.com, O=papaki.com, L=Heraklion, S=Crete, C=GR, E=support@papaki.com"

with your own details.

Field Description

FieldDescription
CN (Common Name)The domain name that will be secured by the SSL certificate
OU (Organizational Unit)Department name (optional)
O (Organization)Company or organization name
L (Locality)City
S (State / Province)State, county, or region
C (Country)Two-letter ISO country code (e.g. GR, US, UK)
E (Email Address)A valid email address

Common Name Examples

For an SSL certificate protecting: www.example.com > CN=www.example.com
For an SSL certificate protecting: example.com > CN=example.com
For a Wildcard SSL certificate > CN=*.example.com

For most DV SSL certificates, the most important field is the Common Name, as it determines which domain will be secured by the certificate.

Note About Key Length

The value: KeyLength = 4096

provides an increased level of security.

Alternatively, you may use: KeyLength = 2048

which remains fully accepted by most Certificate Authorities.


Step 3: Save the request.inf File

  1. Save the file as: request.inf
  2. In the Save as type field, select: All Files (*.*)
  3. Save the file directly under: C:\

Step 4: Open Command Prompt

  1. Type: cmd

in the Windows search box.

  1. Press Enter to open Command Prompt.

Step 5: Generate the CSR

Run the following commands:

cd C:\
certreq -new request.inf request.csr

If the process completes successfully, a new file named: request.csr

will be created in: C:\


Step 6: Copy the CSR

Open the file: request.csr

using Notepad or any text editor.

Copy the entire contents of the file, including the lines:

-----BEGIN CERTIFICATE REQUEST-----

and

-----END CERTIFICATE REQUEST-----

This content will be required during the issuance or reissuance of your SSL certificate.


Important Information About the Private Key

When the CSR is generated, the corresponding Private Key is also created and stored on the server.

Do not:

  • Delete the server before installing the SSL certificate.
  • Reinstall the operating system.
  • Move the website to another server without exporting the certificates and private keys.

If the Private Key is lost, you will need to generate a new CSR and request a reissue of the SSL certificate.


What Should I Do After Generating the CSR?

Once the process is complete:

  1. Copy the entire CSR.
  2. Use it when ordering or reissuing your SSL certificate.
  3. Wait for the certificate to be issued.
  4. Once you receive the SSL certificate, proceed with the installation on your IIS Server.

You haven't found what you are looking for?

Contact our experts, they will be happy to help!

Contact us