
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
- In the SSL Certificates section, select the option Free & automatic certificate from Let's Encrypt.
- 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.
- Check the boxes for both
yourdomain.comandwww.yourdomain.comto cover both versions. - Click Save. DirectAdmin will request and install the certificate automatically within a few seconds.
- 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
- In the SSL Certificates section, choose Create a Certificate Request (CSR).
- Fill in your organization details: Common Name (your domain name), Country, State, Organization Name.
- 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
- Return to the SSL Certificates section in DirectAdmin.
- Select Paste a pre-generated certificate and key.
- Paste your Certificate and Private Key into the corresponding fields.
- If your provider supplied a CA Bundle (intermediate certificate), paste it into the CA Certificate field.
- 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:
- In the SSL Certificates section, look for the Force SSL with https redirect checkbox or toggle.
- Enable it and click Save.
Alternatively, you can add a redirect rule in your .htaccess file (for Apache servers):
- Open File Manager and navigate to
public_html/.htaccess. - Add these lines at the top of the file:
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
- WordPress: Use a plugin such as Better Search Replace to replace all
http://yourdomain.comwithhttps://yourdomain.comin the database. Also update the Site URL and Home URL in Settings → General. - Static HTML sites: Search all HTML, CSS, and JS files for
http://links and update them tohttps://. - External resources: If an external image or script does not support HTTPS, either host it locally or find an HTTPS-compatible alternative.
- Check with browser tools: Open your browser's Developer Tools (F12) and look at the Console tab — Mixed Content warnings show exactly which URLs are causing the problem.
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:
- Completely free with no payment required
- Installs in seconds directly from the DirectAdmin SSL Certificates page
- Covers both
yourdomain.comandwww.yourdomain.comin a single certificate - Renews automatically every 90 days via DirectAdmin's AutoSSL feature
- Ideal for blogs, business websites, portfolios, and any site that needs HTTPS without ongoing cost
- Does not show organization information in the certificate — only the domain name is validated
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:
- DV (Domain Validated): The most basic paid option — validates domain ownership only. Similar to Let's Encrypt but may include a warranty and additional support from the CA.
- OV (Organization Validated): The Certificate Authority verifies both the domain and your organization's legal identity. The organization name appears in the certificate details, adding credibility for business websites.
- EV (Extended Validation): The most rigorous validation process — required documentation, legal checks, and phone verification. Recommended for banks, payment processors, and e-commerce sites that handle sensitive data.
- Wildcard SSL: Covers all subdomains under a single domain (e.g.,
*.yourdomain.com) with one certificate. Cost-effective when you run multiple subdomains such asshop.yourdomain.com,api.yourdomain.com, andmail.yourdomain.com.
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
- DNS must point to the server: Let's Encrypt verifies domain ownership by placing a temporary file at
/.well-known/acme-challenge/and checking it via HTTP. If your domain's DNS points elsewhere, the verification will fail. - Port 80 must be accessible: Firewall rules that block inbound traffic on Port 80 will prevent the HTTP challenge from completing, even if your site runs on Port 443.
- .htaccess must not block the challenge path: If you have redirect rules that send all traffic to HTTPS before the challenge file can be read, Let's Encrypt may not be able to verify ownership. Add an exception for
/.well-known/if needed.
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:
RewriteEngine On— activates Apache's URL rewriting module.RewriteCond %{HTTPS} off— the redirect only fires when the request is HTTP (not HTTPS), preventing an infinite redirect loop.RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]— redirects every URL to its HTTPS equivalent using a 301 (permanent) redirect. The[L]flag stops processing further rules after this match.
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