How to Install SSL in DirectAdmin

An SSL certificate encrypts the connection between your website and its visitors, replacing http:// with the secure https://. Modern browsers display a padlock icon for HTTPS sites and warn visitors when a site is not secure. This guide shows you how to install both free Let's Encrypt SSL and paid SSL certificates in DirectAdmin, then configure Force HTTPS and fix any Mixed Content issues.

Finding the SSL Certificates Section

Log in to your DirectAdmin control panel and go to Advanced Features → SSL Certificates. This page is where you manage all SSL certificates for domains on your account. You will see tabs or options for installing a free certificate, uploading a paid certificate, and configuring HTTPS settings.

Installing a Free Let's Encrypt SSL Certificate

Let's Encrypt is a free, automated Certificate Authority trusted by all major browsers. It is the simplest option for most websites and renews automatically every 90 days.

Step-by-Step: Let's Encrypt

  1. In the SSL Certificates section, select the option Free & automatic certificate from Let's Encrypt.
  2. Make sure your domain's A Record already points to this server's IP — Let's Encrypt will verify domain ownership via HTTP, so DNS must be correct first.
  3. Check the boxes for both yourdomain.com and www.yourdomain.com to cover both versions.
  4. Click Save. DirectAdmin will request and install the certificate automatically within a few seconds.
  5. Once installed, the page will confirm the certificate is active and show the expiry date.

Auto-renewal: Let's Encrypt certificates on DirectAdmin renew automatically before expiry. You do not need to take any action to keep the certificate active as long as the domain remains pointed to the server.

Installing a Paid SSL Certificate

If you purchased a commercial SSL certificate (e.g., from Comodo, DigiCert, or AsiaGB), you will need to install it manually using the CSR/Certificate/Private Key method.

Step 1: Generate a CSR

  1. In the SSL Certificates section, choose Create a Certificate Request (CSR).
  2. Fill in your organization details: Common Name (your domain name), Country, State, Organization Name.
  3. Click Create. DirectAdmin will generate a CSR and Private Key — save both securely.

Step 2: Submit the CSR to Your SSL Provider

Copy the CSR text and paste it into the form on your SSL provider's website to complete the certificate validation and issuance process. The provider will email you the issued certificate file.

Step 3: Install the Certificate

  1. Return to the SSL Certificates section in DirectAdmin.
  2. Select Paste a pre-generated certificate and key.
  3. Paste your Certificate and Private Key into the corresponding fields.
  4. If your provider supplied a CA Bundle (intermediate certificate), paste it into the CA Certificate field.
  5. Click Save to install.

Enabling Force HTTPS

After installing your SSL certificate, you should redirect all HTTP traffic to HTTPS so that every visitor uses the secure connection. DirectAdmin makes this easy:

  1. In the SSL Certificates section, look for the Force SSL with https redirect checkbox or toggle.
  2. Enable it and click Save.
SSL Certificates page showing current SSL status
SSL Certificates page showing current SSL status
Click Free & Auto SSL (circled) to install a Let's Encrypt certificate
Click Free & Auto SSL (circled) to install a Let's Encrypt certificate

Alternatively, you can add a redirect rule in your .htaccess file (for Apache servers):

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

Fixing Mixed Content Errors

After switching to HTTPS, your browser may show a warning or broken padlock icon because some resources on the page (images, scripts, stylesheets) are still loaded over http://. This is called a Mixed Content error and prevents the full HTTPS padlock from appearing.

How to Fix Mixed Content

SSL Certificate Types Available in DirectAdmin

DirectAdmin supports multiple SSL certificate types, from free automated certificates to premium paid options. Choosing the right type depends on your website's purpose and the level of trust you need to establish with your visitors.

Let's Encrypt — Free SSL for All Websites

Let's Encrypt is a nonprofit Certificate Authority that provides free Domain Validated (DV) SSL certificates. It is trusted by all major browsers and is the easiest option for most websites:

Paid SSL Certificates — Comodo, RapidSSL, and Others

Commercial SSL certificates from providers such as Comodo, RapidSSL, and DigiCert (also available through AsiaGB) offer several validation levels and additional features:

Paid certificates typically have a 1-year validity period and require manual renewal before expiry. Set a reminder 30 days before the expiry date to avoid an unplanned certificate outage.

Automatic SSL Renewal with Let's Encrypt and AutoSSL

One of the biggest advantages of using Let's Encrypt on DirectAdmin is that the renewal process is completely automatic. You do not need to log in, submit a renewal request, or install anything — the server handles everything.

How AutoSSL Works

DirectAdmin checks certificate expiry dates daily. When a certificate has less than 30 days remaining, the system automatically sends a renewal request to Let's Encrypt. The verification and installation process takes only a few seconds and has no impact on your live website or visitor traffic.

Requirements for Successful Auto-Renewal

Expiry Notifications and Monitoring

DirectAdmin sends email notifications to the account administrator when a certificate is renewed successfully or when renewal fails. Make sure the admin email address on your hosting account is current and that you check it regularly. For additional peace of mind, consider using an external SSL monitoring tool that alerts you if a certificate is within 14 days of expiry — this catches any edge cases where AutoSSL may have failed silently.

Redirecting HTTP to HTTPS in .htaccess for All URLs

Even after installing SSL, visitors who type your URL without https:// or follow old bookmarks will still land on the HTTP version of your site. A permanent redirect rule in .htaccess ensures every visitor is always served the secure HTTPS version, regardless of how they arrived.

Standard HTTP to HTTPS Redirect Rule

Open File Manager in DirectAdmin, navigate to public_html/.htaccess, and add these lines at the very top of the file — before any WordPress or other application rules:

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

Breaking down each line:

Important: Install SSL Before Adding the Redirect

Always confirm that your SSL certificate is installed and active before adding the HTTP-to-HTTPS redirect rule. If you add the redirect first and the certificate is not yet active, your site will redirect all visitors to a broken HTTPS URL that displays a certificate error, effectively making your site unreachable. Install the certificate → verify it works in your browser → then add the redirect rule.

Get Hosting with Free SSL Included

All AsiaGB hosting plans include free Let's Encrypt SSL with automatic renewal — your site is secured from day one, no extra cost.

View Hosting Plans