cPanel Wildcard SSL

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>