How to use SSL with domain mapping in multisite wordpress

So, I have a multisite wordpress with two domains, I installed a SSL certificate on the second domain, but doesn’t seem to work, how can I make this work?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @kvny,

You’ll need to update your WebService’s config file (Apache/Nginx) to include the SSL you’ve installed. Can you let us know which of the two mentioned you are using so that I can provide you with more information on how to reach/find where to update the config files?

If you are unsure how to check which one you are using, you can enter your droplet via SSH and type in the following command:

netstat -tulpen | grep 80

It should display what service is listening on port 80, either Apache or Nginx. From there you can enter your configuration file and add your SSL bit to it.

Regards, KFSys

It’s relatively easy to get certbot going to create and install the certificate, but the problem is that you can’t create multiple sites configs in Apache and then let certbot create a certificate for them all, since the forwarding that will be set up, conflicts with the forwarding done in Wordpress by the domain mapping plugin. So here’s how I got going.

For the single site config in Apache (the main network site in Wordpress), create a certificate, but specify all the domains to be added to the certificate by using the -domain option and add each domain in the wordpress network of sites.

certbot --apache --domains --domains --domains

Now the certificate will validate all the domains in the network site.

If you add more domains, just rerun the certbot command