SSL, Multi-Site, & Domain Mapping Issues

Currently we have a site that is setup on WordPress Multi-Site under a Multi-Domain SSL and using Domain Mapping to direct to the primary domains.

Apparently this doesn't work with domain mapping.

Any suggestions or alternatives?

  • Sybre Waaijer
    • The Incredible Code Injector

    Hello @andpixels and @Patrick

    If you're using cPanel or any other WAMP service, I'd suggest you'd install the certificate (multidomain or single) for each and every website it's based upon in the server. The apache/nginx/litespeed server will fetch the correct certificate upon each request.

    To force HTTP you'd need to add this code in the root's .htaccess (that is public_html, where your first index.php file is):

    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]
    RewriteRule ^(.*)$$1 [R=301,L]
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} ^otherdomain\.com [NC]
    RewriteRule ^(.*)$$1 [R=301,L]

    Repeat that code for each domain you want SSL for.

    If you're using SSL for your subdomains, assuming you have a wildcard certificate, use the following code too:

    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} ^(.*)\.yourdomain\.com [NC]
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    Leave all options in the Domain Mapping as default, do not force HTTPS in there, the .htaccess code above works much more efficient and trustworthy.

    Let me know if it's working for you :slight_smile: Have a great day!

    I'm going to transfer a few SSL domains into my MultiSite soon, if I find any bugs or issues I'll let you know with a workaround.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.