Viewing 1 replies (of 1 total)
  • Please see the “Before You Create A Network” document here: https://developer.ww.wp.xz.cn/advanced-administration/multisite/prepare-network/

    Note that WordPress multisite subdomains are virtual. If you’re getting 404, that tells me your subdomains have their own directories (document root)… which is the wrong way to do this.

    From the high-level view, there are two ways to configure your subdomains for WordPress multisite:

    The simplest way is to create a CNAME DNS record for each subdomain (e blog.example.com) or a single wildcard subdomain record for all subdomains (*.example.com) pointed at the primary Multisite domain (example.com). With this, no additional teak is needed on the web server.

    The other option is to use DNS A record instead (individual subdomains or wildcard), pointed at the IP address of the hosting server. But with this, you also need to have vhost config for the subdomain(s) configured on the hosting server, but pointed at the same directory (document root) for the primary domain’s vhost configuration.

    What I’ve described above are the high-level tasks if you were manually creating DNS records and editing your web server’s configuration files. If you’re with a shared hosting provider, these tasks will likely be abstracted to some tools to create subdomains or somesuch. So, exactly how you do either of the above will depend on your hosting environment and what tools your hosting provider makes available to you.

    Whichever way you do this, the end result is that, even before creating the subsite in WordPress, visiting https://sub.example.com (un-configured subdomain site) should take you to https://example.com (primary site).

    That is, the request for the subdomain site needs to be forwarded to the WordPress installation at the primary site… before WordPress can capture it and redirect to the appropriate subsite (if it exists). If the subsite does not exist, WordPress should show a notice to that effect… but this is a 200 from WordPress, not 404 from your webserver.

Viewing 1 replies (of 1 total)

The topic ‘How to debug multisite setup?’ is closed to new replies.