WP Multisite subdomain dashboard and site not accessible

Hello,
I recently decided to use MPMU, so I did fresh Multisite installation on my domain. The root domain (mydomain. com) Site and Dashboard is accessible.
I then created subsites (subdomain. mydomain. com), the dashboards and site are not accessible.

*Dashboard Error
When i try to access the admin dashboard via subdomain.mydomain.com/wp-admin/, I get 404 error.

Note: Do not have Litespeed plugin installed on site. my host is interserver

*Site Error
When i visit my subsite via subdomain.mydomain.com, I get Index of/ page

I have create Wildcard domain in Cpanel and on Cloudflare DNS
Added the subdomain A record on cloudflare.

.htaccess :
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
</IfModule>

# END WordPress
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php73___lsphp .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

*Wp-config.php
/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
define( 'DOMAIN_CURRENT_SITE', 'mydomain  .com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

/* That's all, stop editing! Happy publishing. */

I would need help. I have researched the internet for the past 48hrs with no working results from the resources of similar issue

Hello,
So i have found the solution a temporal solution.
I removed the Subdomain record from the Cloudflare DNS.
And i was able to access both subsite dashboard and site. But without SSL (https).

May be someone can educate me on why if am using Cloudflare Free SSL when subdomain record is added to DNS, I get 404 error and index of,
When I revert to http I can access the dashboard and site.

Multiple things to question/consider in the process:

  1. WordPress Multisite setup → ADmin has to be over HTTPS (SSL)
  2. Main domain (non-www + www) + sub-domains (sub1, sub2 → with or without www?, like www.sub1 www.sub2 → possible issue)
  3. HTTPS → SSL certificate for all of them (possible issue if not having it)

Steps to troubleshoot:

  1. WordPress multisite

I would use some tutorial, may I ask you have you used some?:

Next, make sure your WordPress installation(s) are configured to work over HTTPS:

  1. Domain + sub-domains

There could be an issue if you are using 4th level for example www.sub1.domain.com and how to resolve it is tu use Dedicated SSL / Advanced Certificate Manager:

  1. HTTPS generally for everything, having a valid and installed SSL certificate at the origin host/servercovering all of them and using Full (Strict) SSL at Cloudflare:

Before moving to Cloudflare, was your Website working over HTTPS connection?

May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

Did you had valid SSL certificate installed or not at your origin host / server for your domain name (covering both naked domain, www, and other sub-domains)?

Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

I see you are using LiteSpeed server. My best guess is your SSL certificate wasn’t yet generated for your new sub-domain(s), therefore you got some error (despite the .htaccess configuration).

You may have to run AutoSSL on cPanel or ask your web hosting provider to issue it for your domain (and sub-domains).

Nevertheless, the solution here would be to wait a bit more and make sure the sub-domain hostname (DNS record) at Cloudflare dashboard under the DNS tab is unproxied and set to :grey:(DNS-only) so SSL certificate could be successfully generated.
Upon success, switch back to proxied :orange: cloud:

Kindly, there are few differences:

  1. Universal SSL
  2. Dedicated SSL
  3. Origin SSL

Source to find out more information:

In case you do not have an SSL certificate, you can use Cloudflare SSL, if so, kindly make sure you follow the instructions as follows on the below article to setup an SSL certificate using Cloudflare Origin CA Certificate:

Last but not least, kindly have a look here for more information regarding correct SSL settings at the SSL/TLS tab on Cloudflare dashboard:

Otherwise, if your web hosting provider does not work with HTTPS (there are few), you might want disable and select “Off” under the SSL/TLS tab of Cloudflare dashboard and use insecure webiste → which I doubt you really want for your users and really it is not recommended to disable it.

Using Flexible SSL is not the right way and you would end up in a lot of other issues too:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.