← Back to list

How to Install an SSL Certificate

Securing your website with an SSL certificate is essential for establishing trust and protecting user data. Here’s a detailed step-by-step…

CRAC Learning · 2025-02-04 10:09 · 0 claps · 2.3 min read
#ssl #ssl-certificate #https #security #secure
Open on Medium ↗

How to Install an SSL Certificate

Securing your website with an SSL certificate is essential for establishing trust and protecting user data. Here’s a detailed step-by-step guide to installing an SSL certificate for your website:

Step 1: Purchase and Obtain an SSL Certificate

  1. Purchase the Certificate: Select a trusted Certificate Authority (CA) such as DigiCert, GlobalSign, or opt for a free option like Let’s Encrypt.
  2. Generate a Certificate Signing Request (CSR): Generate the CSR through your server or hosting control panel. Include your domain name, organization details, and other required information.
  3. Submit the CSR to the CA: Provide the CSR to the Certificate Authority for validation.
  4. Complete Domain Ownership Verification: Depending on the CA, verification may involve email validation, DNS record updates, or file uploads.
  5. Download the SSL Certificate: Once issued, download the certificate along with intermediate certificates (CA bundle).

How to Generate a CSR (Certificate Signing Request) on Your Server

A Certificate Signing Request (CSR) is essential for obtaining an SSL certificate. It contains your server’s public key and the details of your organization. Here’s a step-by-step guide to generate a CSR on your server:

For Linux/Unix Servers (OpenSSL)

  1. Log in to Your Server: Use SSH to access your server.
  2. Run the OpenSSL Command:
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr

Fill Out the Required Information:

  • Country Name (2-letter code): Example: US
  • State or Province: Example: California
  • Locality: Example: San Francisco
  • Organization Name: Example: Your Company Name
  • Organizational Unit: Example: IT Department
  • Common Name: Enter the fully qualified domain name (e.g., [www.example.com).](http://www.example.com).)
  • Email Address: Optional, but recommended for contact purposes.

This will generate two files:

yourdomain.key: Your private key (keep this secure and do not share).

yourdomain.csr: The CSR file to submit to the Certificate Authority (CA).

For Windows Servers (IIS)

  1. Open Internet Information Services (IIS) Manager:
  2. Press Win + R, type inetmgr, and press Enter.
  3. Navigate to Server Certificates:Select your server and click Server Certificates in the features pane.
  4. Create a Certificate Request:In the Actions pane, click Create Certificate Request.
  5. Fill in the CSR Details: Common Name: Fully qualified domain name.
  • Organization: Your business or organization name.
  • Organizational Unit: Department (e.g., IT).
  • City/Locality, State, and Country: Enter appropriate details.

6. Choose Encryption and Save: Select 2048-bit RSA encryption and save the CSR file.

For cPanel

  1. Log in to cPanel: Use your hosting provider’s cPanel login.
  2. Go to SSL/TLS: Navigate to SSL/TLS > Generate, view, upload, or delete SSL certificates.
  3. Generate a New CSR: Click Generate a New CSR and fill out the details: Domain, City, State, Country, Company Name, etc.
  4. Copy the CSR: Once generated, copy the CSR and private key for future use.

Step 2: Install the SSL CertificateFor Apache Servers:

  1. Locate the Apache Configuration File: The file is usually named httpd.conf or ssl.conf and is found in the /etc/httpd/ or /etc/apache2/ directory.
  2. Add SSL Configuration Directives:
SSLCertificateFile /path/to/your_certificate.crt 
SSLCertificateKeyFile /path/to/your_private_key.key 
SSLCertificateChainFile /path/to/ca_bundle.crt

Restart Apache:

sudo systemctl restart apache2
cat your_certificate.crt ca_bundle.crt > combined.crt

For Nginx Servers:

  1. Combine Certificates: Concatenate your SSL certificate and intermediate certificate into one file:
  2. Update Nginx Configuration: Open the server block configuration file and add the following:
server {     
listen 443 ssl;     
server_name example.com;      
ssl_certificate /path/to/combined.crt;     
ssl_certificate_key /path/to/your_private_key.key; 
}

Test and Reload Nginx:

sudo nginx -t sudo systemctl reload nginx

Step 3: Verify the Installation

  1. Test Using Online Tools: Use a tool like SSL Labs’ SSL Test to analyze your SSL installation and verify its correctness.
  2. Check Your Website: Access your site using https:// and ensure the browser displays a secure padlock.Conclusion

Installing an SSL certificate is a vital step toward enhancing your website’s security and trustworthiness. Following the steps above ensures a smooth installation process for Apache, Nginx, or other server environments.


메타데이터
post_id
ade5d7a4200b
slug
how-to-install-an-ssl-certificate-ade5d7a4200b
url
https://medium.com/@_crac/how-to-install-an-ssl-certificate-ade5d7a4200b
canonical_url
https://medium.com/@_crac/how-to-install-an-ssl-certificate-ade5d7a4200b
author_url
https://medium.com/@_crac
status
ok
fetched_at
2026-06-26 12:24:55