Follow these steps to install an SSL certificate on a sub-domain using DirectAdmin:
Step 1: Login to your DirectAdmin account.
Step 2: Go to the Account Manager section and click on SSL Certificates.
Step 3: Click on the option Free & automatic certificate or something similar like Get automatic certificate from ACME Provider.
Step 4: In this window, you will be able to configure the settings for your free SSL certificate.
Step 5: The Force SSL with https redirect option is important to automate redirection from HTTP to HTTPS. Ensure you tick this option.
Step 6: Click on the Save button next to it. You will see a success message indicating: Certificate and Key Saved.
By following these steps, you can install an SSL certificate for a sub-domain in DirectAdmin.