Wordpress problem after following some tutorials.

Posted March 25, 2017 1.9k views
NginxWordPressLet's EncryptUbuntu 16.04

I followed this tutorial. How To Install WordPress with LEMP on Ubuntu 16.04( - I also followed Prerequisites.

Wordpress site works well with letsencrypt.

But I want to add wordpress multisite with sub domain&domain mapping.
exsisted wordpress
wordpress multisite sub-domain
domain mapping

I tried How To Set Up WordPress Multisite with Nginx on Ubuntu 14.04 (

But I can’t access neither sub-domain nor domain-mapped domain.
I can’t access / and redirected to

How can I set up Wordpress Multisite with exsisted wordpress site.

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.

Submit an Answer
3 answers


You’ll need to setup a WildCard DNS A entry for sub-domains to map to your primary domain. If you look at the guide, you’ll see this:

server_name *;

This tells NGINX to map all sub-domains to your main domain unless they actually resolve to another server block. This doesn’t, however, account for DNS.

You’ll need to add an A entry to your DNS zone file for the WildCard (i.e. *). That’d look like this:

A          *          DROPLET_IP

Where DROPLET_IP is your Droplets IPv4 IP. With those two things taken care of, you should be able to use and it resolve to the main domain. If it happens to be mapped using WPMU, then WPMU should take over and map the correct WordPress site.

One other thing to note is that LetsEncrypt doesn’t support WildCard domains, so you can’t pass:

letsencrypt certonly -d -d *

You have to pass resolvable domains and sub-domains, i.e.

letsencrypt certonly -d -d

This may be an issue since you’re wanting to use sub-domain mapping as the only way (right now) to get a WildCard SSL Certificate is to buy one. So without a WildCard SSL Certificate, each site would be HTTP only (not HTTPS/SSL/HTTP2).

  • Can I use

    letsencrypt certonly -d -d -d -d -d

    Like this?

    I also tried this.


If you use sub-domain mapping and want SSL for each mapped installation, you’d need to purchase a WildCard SSL Certificate for your main domain and install it. LetsEncrypt won’t work for WildCards.

Passing multiple domains to the LetsEncrypt script in this case, would not be the best option as this is something you’re going to have to do over and over again for each and every sub-domain you add as a site. That means if you add two sub-domains today, you have to run it. If you add two more tomorrow, same scenario.