How to set up SSL via DirectAdmin?
SSL Installation in DirectAdmin
Once the Certificate Authority provides your SSL certificate, you need to install it on your web hosting server. You can install the certificate in DirectAdmin as follows:
- Click the button in the upper-left corner of the screen as shown in the screenshot below to navigate to your server's main menu. Choose User Level:
- In the Account Manager section, click on SSL Certificates:
- Select the option Paste a pre-generated certificate and key:
- Next, paste the Private Key for your SSL into the Key field.
Note: The Private Key is generated simultaneously with the CSR code. The Private Key is enclosed with the following header and footer: -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY-----. If you generate the CSR code in DirectAdmin, you need to manually save the Private Key since DirectAdmin doesn't automatically save it.
- Paste the certificate code you received from the Certificate Authority, including the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----, into the Certificate field. This same code is also found in the yourdomain.crt file located in your easy4ssl.com account. You can open this file with a plain text editor like Notepad (Windows) or TextEdit (macOS).
- After pasting the keys, check the Force SSL with https redirection option. This enables HTTPS redirection for your website, automatically redirecting your visitors to the secure version of your site. Then, click Save.
- To complete the setup, upload the CA Bundle file (.ca-bundle) to DirectAdmin.
This file is included in the SSL certificate ZIP archive you received via email from the Certificate Authority. You can also download all SSL files from your easy4ssl account. The CA Bundle file should be named yourdomain.ca-bundle.
Use Notepad (Windows) or TextEdit (macOS) to open the file and copy its contents in the required TXT format for the DirectAdmin panel.
- Select the "Paste a pre-generated certificate and key" option, and click on SSL CA Certificate.
- Then, copy the entire contents of the .ca-bundle file and paste it into the box, and check the Use a CA cert option. After that, click Save.
- You will see a notification that says "Successful CA certificate is complete. Your site will be secure in a few minutes." This means that the SSL has been successfully installed.
" Troubleshooting the Error "Your Request Was Not Successful"
Occasionally, when opening SSL Certificates in your Account Manager, you may encounter the error message: "Your request was not successful. SSL is not enabled for this domain." This indicates that the "Disable SSL" option is enabled in your DirectAdmin's SSL Certificates section. This option prevents SSL installation and also prevents the user from accessing the SSL Certificates section. Consequently, when this option is enabled, you cannot upload your certificate or disable the option from the user management area.
You can only disable this option via SSH. For this, you need root access to the server where DirectAdmin is installed. Once logged in as a root user, run this command to open the configuration file for the domain:
sudo nano /usr/local/directadmin/data/users/USER/domains/DOMAIN.TLD.conf
- nano is the command to open a .txt file.
- USER is the name of the account for which you want to apply changes.
- DOMAIN.TLD is your domain name.
Find the line ssl=OFF in the configuration file and change it to ssl=ON. Then, press CTRL+O to save the changes and CTRL+X to exit the file. This will fix the error.
If the SSL Certificates section error persists, contact your hosting provider for further assistance.