How to install wildcard SSL for sub-domains in cPanel
Apache does allow for multiple VirtualHosts, and for each subdomain configured in cPanel, an additional VirtualHost will be configured. When installing a wildcard certificate, you’ll want to go into WHM >> Install a SSL Certificate and Setup the Domain, setting the domain to *.yourdomain.tld, then filling in the domain, IP and the actual certificate data.
This will allow the certificate to be used for any subdomains on the main domain’s IP address.
There will be one additional step required to the second set of VirtualHosts for port 443 on the subdomains.
In /var/cpanel/userdata/username directory, you’ll want to copy the SSL file created (yourname.tld_SSL) to subdomain.yourname.tld_SSL, anothersubdomain.yourname.tld_SSL, etc. You’ll need one of these for each subdomain.
Then you’ll need to edit each xxx.yourname.tld_SSL file, and update the documentroot value for each subdomain.
Lastly, run /scripts/rebuildhttpdconf to rebuild the httpd.conf file with the new VirtualHosts, and restart apache with /scripts/restartsrv_httpd.




Thanks…this documentation was very helpful….Thanks so much posting this
Pingback: HTTPS in sub domain serves content from main domain. Wildcard SSL installed.
Yes, you need to copy SSL file and rename the new file to your sub-domain’s name