How to Install SSL Certificates in DirectAdmin

Categories: DirectAdmin

An SSL certificate is essential for any website, securing data transmitted between users and the server while also boosting trust and SEO rankings. DirectAdmin makes installing SSL certificates straightforward, whether you choose a free option like Let’s Encrypt or a custom certificate from a third-party provider. This guide will walk you through each step of installing SSL certificates in DirectAdmin to secure your site.

1. Accessing SSL Management in DirectAdmin

To install SSL, you need to navigate to the SSL management section of DirectAdmin:

  • Log in to your DirectAdmin control panel.
  • Go to Account Manager > SSL Certificates.

This page is where you’ll manage SSL settings and certificates for each domain on your account.

2. Installing a Free SSL Certificate with Let’s Encrypt

Let’s Encrypt is a popular, free SSL provider supported by DirectAdmin, offering quick and automatic installation. Here’s how to set it up:

  • In SSL Certificates, select Free & Auto-Install Let's Encrypt Certificate.
  • Ensure your domain, www.yourdomain.com, and any subdomains are selected if you want to secure them.
  • Check the box for Automatic Renewal to keep the SSL certificate updated without manual intervention.
  • Click Save to install the certificate.

Let’s Encrypt will generate and apply the SSL certificate to your domain. It usually takes a few minutes for the changes to take effect, and once complete, your domain will be accessible via HTTPS.

3. Uploading a Custom SSL Certificate

If you have a custom SSL certificate from a third-party provider, DirectAdmin allows you to upload and install it. Here’s how:

  1. Generate a CSR (Certificate Signing Request):

    • Before purchasing an SSL, most providers will ask you to submit a CSR.
    • In SSL Certificates, select Create A Certificate Request.
    • Fill in your domain details, company name, city, country, and email.
    • Click Save to generate the CSR and save the code to provide to your SSL provider.
  2. Receive the Certificate Files:

    • After submitting the CSR to your SSL provider, they will issue your SSL certificate files, including the Certificate (CRT) and CA Bundle (certificate authority files).
  3. Upload the Certificate:

    • Return to SSL Certificates in DirectAdmin.
    • Choose Paste a pre-generated certificate and key.
    • Paste your Private Key and Certificate (CRT) code into their respective fields.
    • Optionally, paste the CA Bundle if provided by your SSL vendor.
    • Click Save to apply the SSL certificate.

Once you’ve completed these steps, your SSL certificate should be active. Test your domain by visiting https://yourdomain.com to verify it’s secure.

4. Enforcing HTTPS for Your Domain

After installing SSL, you should redirect all traffic to the HTTPS version of your site to ensure all visitors are accessing the secure version. Here’s how:

  1. Edit .htaccess File (for Apache servers):

    • Go to File Manager and open your domain’s public_html directory.

    • Locate the .htaccess file (or create one if it doesn’t exist).

    • Add the following code:

      
       

      apache

       

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

    • Save the file.

  2. Using Force HTTPS Option (if available):

    • Some versions of DirectAdmin have a Force SSL option directly in the SSL Certificates area.
    • Check the box to force HTTPS and click Save.

Redirecting traffic to HTTPS ensures a seamless, secure experience for users and improves search engine rankings.

5. Renewing SSL Certificates

SSL certificates have an expiration date, typically set at 90 days for Let’s Encrypt and one year or more for custom certificates. Here’s how to handle renewals:

  • Let’s Encrypt: DirectAdmin can automatically renew Let’s Encrypt certificates if you enabled the automatic renewal option during setup. Verify it’s working by checking SSL Certificates to confirm your certificate is active and set to auto-renew.
  • Custom Certificates: For custom certificates, your SSL provider will remind you before expiration. Generate a new CSR if needed, follow the provider’s instructions to renew, and upload the updated certificate files in SSL Certificates.

6. Troubleshooting SSL Issues

Occasionally, SSL installation may encounter issues. Here are common problems and solutions:

  • Domain Not Secure (Mixed Content): Check that all resources (images, scripts) on your pages use HTTPS URLs. If they don’t, update the links to HTTPS to resolve mixed content warnings.
  • Expired Certificate Warning: This warning usually means the certificate wasn’t renewed on time. Renew the certificate in DirectAdmin or contact your provider for support.
  • Invalid Certificate Errors: This may happen if the SSL certificate is misconfigured. Verify that all certificate files (CRT, Private Key, CA Bundle) are correctly entered in DirectAdmin.

7. Testing Your SSL Certificate

After installation, test your SSL certificate to ensure it’s correctly configured:

  • Visit https://yourdomain.com to check if it loads securely.
  • Use SSL testing tools like SSL Labs’ SSL Test or Why No Padlock? to verify that your SSL setup is valid and detect any potential security vulnerabilities.

These tools provide insights into SSL configurations, such as encryption strength and potential issues with intermediate certificates.

 

Installing SSL certificates in DirectAdmin is a straightforward process that strengthens your website’s security, builds trust with visitors, and enhances your SEO. Whether you use Let’s Encrypt for a quick, free SSL or a custom certificate for added control, DirectAdmin simplifies the installation and management process. By following this guide, you can secure your domain and enjoy the benefits of HTTPS in no time.