The article will help you to install an SSL certificate on DirectAdmin
Prepare:
- Purchase an SSL certificate for your website domain. You can buy it at SSLs.com for a very cheap price, only $3.44/year.
- Download the certificate as domain.zip via the email you registered with the provider.
Note:
After extracting, there will be the following files
- 1 certificate file (extension domain.pem)
- 2 files chain and rootCA (*.crt extension)
- 1 file bundle (intermediate certificate of CA) that collects the contents of the file chain and rootCA
If the vendor does not provide a bundle file, you must manually combine the content of the chain files and the rootCA together to form a bundle file.
The steps to install SSL on DirectAdmin are as follows:
Step 1. Access hosting: DirectAdmin > Advanced Features > SSL Certificates
Step 2. Add the certificate to hosting
Get the content of the self-created Private Key file and Certificate with Notepad and paste it in this section, both Private Key and Certificate
Go back to the SSL management section, select Click Here via the CA paste section
Paste the Intermediate Certificate (the entire contents of the file domain.ca-bundle) into this box and click Save
Step 3. Customize Domain Name
Back to Home > Domain Setup > Your Domain Name
Enable SSL security as shown, click Save
Step 4. Configure HTTP to HTTPS
You find the .htaccess file in the webroot /public_html/ path, add the following content
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Thus, we have shown you how to install SSL on DirectAdmin. Good luck!