StarDomain

How to Install an SSL Certificate in DirectAdmin

How to Install an SSL Certificate in DirectAdmin

Installing an SSL certificate in DirectAdmin secures your website with HTTPS encryption, protecting sensitive data and improving your search engine rankings. This comprehensive guide covers the entire process, from generating a CSR to verifying your installation.

Prerequisites

Before beginning the SSL installation, ensure you have:

  1. DirectAdmin account access with SSL management permissions
  2. A valid SSL certificate from your certificate authority (CA)
  3. The private key generated with your CSR
  4. The CA certificate bundle (intermediate certificates)
  5. Domain pointed to your server via DNS A record

Tip: If you are using a hosting plan from {{COMPANY_NAME}}, SSL management is available in your DirectAdmin control panel by default. No additional permissions are needed.

Step 1: Generate a Certificate Signing Request (CSR)

If you have already obtained your SSL certificate, skip to Step 2.

  1. Log in to your DirectAdmin control panel
  2. Navigate to Account Manager > SSL Certificates
  3. If SSL is not enabled, check the Secure SSL checkbox first and click Save
  4. Select Create a Certificate Request
  5. Fill in the required information:

- Common Name: Your domain name (e.g., example.com)

- Email: Your contact email

- Organization: Your company or personal name

- Organization Unit: Department (e.g., IT)

- City, State/Province, Country: Your location details

- Key Size: Select 2048 or 4096 bits

  1. Click Save
  2. DirectAdmin will display your CSR and Private Key
  3. Copy the CSR and submit it to your certificate authority
  4. Save the Private Key securely — you will need it for installation

Important: Never share your private key. If it is compromised, your SSL certificate must be revoked and reissued.

Step 2: Install the SSL Certificate

Once your certificate authority has issued your SSL certificate:

  1. Log in to DirectAdmin
  2. Go to Account Manager > SSL Certificates
  3. Select Paste a pre-generated certificate and key
  4. In the certificate text area, paste the following in order:

- Your SSL certificate (the content of your .crt file)

- Your Private Key (if not already stored in DirectAdmin)

  1. Click Save

Installing the CA Bundle (Intermediate Certificate)

The CA bundle is critical for establishing the chain of trust:

  1. After installing the main certificate, scroll down on the SSL Certificates page
  2. Look for the CA Root Certificate section (or a link labeled "Click Here to paste a CA Root Certificate")
  3. Paste the contents of your CA bundle (intermediate certificate)
  4. Click Save

Important: Without the CA bundle, visitors may see "certificate not trusted" warnings even though your certificate is valid. Always install the intermediate certificate.

Step 3: Verify SSL Installation

After installation, verify everything is working correctly:

  1. Browser check: Visit your site using https:// and click the padlock icon to view certificate details
  2. Certificate chain: Verify the certificate chain is complete (no missing intermediates)
  3. Online SSL test: Use an SSL checker tool to verify:

- Certificate validity and expiration date

- Correct certificate chain

- Supported TLS versions

- No mixed content issues

Step 4: Configure HTTPS Redirect

Force all traffic to use HTTPS:

Method 1: DirectAdmin Force SSL

  1. In DirectAdmin, go to Account Manager > SSL Certificates
  2. Enable the Force SSL with https redirect option
  3. Click Save

Method 2: .htaccess Redirect

Add these lines to your .htaccess file in the public_html directory:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Method 3: DirectAdmin Domain Settings

  1. Go to Account Manager > Domain Setup
  2. Click on your domain name
  3. Enable Force SSL and save

Managing Multiple Domains

If you have multiple domains on your DirectAdmin account:

  1. Each domain requires its own SSL certificate (unless using a multi-domain or wildcard cert)
  2. Navigate to the specific domain's settings before installing SSL
  3. Use the domain selector at the top of DirectAdmin to switch between domains
  4. Repeat the installation process for each domain

Troubleshooting Common Issues

Error: SSL Certificate Does Not Match the Private Key

  • The private key must be the one generated alongside the CSR used to obtain the certificate
  • Solution: Generate a new CSR, reissue the certificate, and install both the new key and certificate

Error: Certificate Chain Is Incomplete

  • The CA bundle (intermediate certificate) is missing or incorrect
  • Download the correct CA bundle from your certificate provider
  • Install it in the CA Root Certificate section

HTTPS Not Working After Installation

  • Verify SSL is enabled for the domain in Domain Setup
  • Check that port 443 is open and accessible
  • Clear your browser cache and try again
  • Verify DNS is pointing to the correct server IP

Redirect Loop After Forcing HTTPS

  • If you are behind a reverse proxy or CDN, the proxy may communicate with your server over HTTP
  • Check for conflicting redirect rules in .htaccess
  • Remove duplicate Force SSL settings (use only one method)

Certificate Shows Wrong Domain

  • Ensure you selected the correct domain before installing the certificate
  • The Common Name on the certificate must match your domain
  • For www and non-www coverage, ensure both are included in the certificate (SAN)

Renewing Your SSL Certificate

SSL certificates expire and must be renewed:

  1. Generate a new CSR (or reuse your existing private key if your CA allows)
  2. Submit the renewal request to your certificate authority
  3. Receive the renewed certificate
  4. Install it following Step 2 above
  5. Install the updated CA bundle if provided

Tip: Set a calendar reminder 30 days before expiration to ensure uninterrupted HTTPS coverage.

  • Free SSL with Let's Encrypt in DirectAdmin
  • Understanding SSL Certificate Types
  • Troubleshooting SSL Certificate Errors

Need help installing your SSL certificate? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}. We are happy to assist with SSL installation and configuration.