Add SSL / HTTPS for WordPress Network sub-site as cPanel Alias Domain

by Yang Yang on February 10, 2019

A top level domain is added to WordPress Network / Multi-sites via the Domain Mapping plugin. However since the domain is not in the cPanel as an addon domain, AutoSSL will not issue SSL certificate for it.

The solution is, after adding the top level domain in the Domain Mapping plugin, add it in cPanel as an alias domain for the WordPress Multi-site main domain (independent cPanel account).

Therefore AutoSSL will issue and install an SSL certificate for the alias domain. Go to “Manage AutoSSL” in WHM and “Run AutoSSL For All Users” to manually request SSL certificate for the alias domain.

It may take some minutes for the new certificate to be installed.

Problematic step: Previously I did below but it seemed to mess backend dashboard and kept auto-switching between http:// vs. https://, logging out again and again. So DON’T DO THIS? However, it might be a Chrome redirect cache issue though. I’m doing this now and will keep an eye on any potential issue.

Go to WordPress Multi-site: “My Sites” => “Network Admin” => “Sites” => Click “Edit” of the sub-site, and change the Site Address (URL) to the top level domain URL like this:

https://www.example.com/

Click “Save Changes“.

Now install the Really Simple SSL plugin, network activate it, and choose per site mode.

Go to the sub-site dashboard: “Settings” => “SSL” => Activate SSL

Done!

If you haven’t done the above problematic step, below is optional and NOT required at all, otherwise below is required.

You can force HTTPS on the top level domain in .htaccess of your WordPress network installation:

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} yourtopleveldomain\.com
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# BEGIN WordPress
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . index.php [L]

{ 0 comments… add one now }

Leave a Comment

Previous post: