Anyone figured out how to use WordPress MultiSite with Domain Mapping & SSL?

I am using multisite with domain mapping. I chose the CNAME option for pointing the mapped domain name.

My site is installed as a sub directory.

  • http:// homesite.org/seedlivelihood

Files are served like so:

  • https:// homesite.org/seedlivelihood/wp-content/plugins/woocommerce/assets/css/fancybox.min.css?ver=3.2.1

With domain mapping the site is at:

  • seedlivelihood.org

Which is where my SSL is set up to be from.

Safari is choosing to not load .js and .css files that are coming from homesite.

Failed to load resource: The certificate for this server is invalid.
You might be connecting to a server that is pretending to be
“seedlivelihood.org” which could put your confidential information at
risk.

For any who wonder, this is how I solved this. I added this to .htaccess

RewriteCond %{HTTP_HOST} original.org
RewriteCond %{REQUEST_URI} ^/subdirectoryname/wp-content/plugins
RewriteRule ^subdirectoryname(.*)$ https://newname.org$1 [L]

Once again, the situation was that the domain mapping was remapping what the viewer saw but not remapping any plugin files. Using this I was able to rewrite original.org/subdirectoryname/wp-content/plugins/ to the new mapped domain: newname.org/wp-content/plugins

This solved my SSL woes and gave me the coveted greenlock. I do still have one file that gets created last minute with .js that somehow eludes the hack.

Leave a Comment