I have setup a multisite using subdomains. I created

I have setup a multisite using subdomains. I created a wildcard subdomain "*.permaethos.com" and DNS "*.permaethos.com".
The main site loads fine and I am able to add subsites from the dashboard. The problem is that when I visit the subsite's dashboard or the subsite itself I get a 404 error.
I have made sure I entered the correct information in my wp-config.php and .htaccess files according to the Network Setup page. I have also ensured that my main site is located in the "public_html" directory.
What am I missing? Does my server need something enabled?
The subsite I am trying to access is "learn.permaethos.com"
I do not see a directory being created by WordPress in my "public_html" directory.

  • JosiahW

    Here is what the network setup had me put in my wp-config.php:

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'permaethos.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    Here is what the network setup had me put in my .htaccess:
    RewriteEngine On
    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]

    I am on a dedicated server and IP address. I do host other sites on the server but only three.

  • xonuox


    This is a great question, and one that I ran into myself. Sorry you are having difficulty.

    How long ago did you make the wildcard DNS entry and create the wildcard subdomain?

    I ask, because it can typically take 4-6 hours for things to start resolving. Also, if it has been longer than this...i would contact your Host Provider. Every time I create a site where wildcards are used, I have to have my Host reset the DNS zones for the domain. I host with HostGator. Once they reset....all will be great!

    Hope this helps you resolve your problem.

    Note: I also tried visiting me.permaethos.com, which should have redirected me to your signup page. It didn't which is another reason why I'm sure it's your DNS zone.

  • Vaughan

    Hi @JosiahW,

    This definitely looks to be an issue with wildcard subdomains.

    You can test if they are set up correctly by typing in any subdomain.

    eg. http://testing.permaethos.com if you haven't created that subsite, then it should always display the homepage of your main site.

    You shouldn't need the DNS zone *.permaethos.com

    If you're on CPanel, all you need to do is just go to subdomains & create *.permaethos.com and point it at your public_html

    Wordpress doesn't create any extra folders for each subdomain, as the wp core creates these using rewrite rules.

    Hope this helps.

  • Patrick

    Hey there @JosiahW

    Welcome to the forums, glad to have you aboard!

    First thing, WordPress will not create a physical folder in your site root for sub-sites in a multisite setup. That's because they are not physically separate sites.

    WordPress will create a new set of database tables prefixed with the site ID for each new sub-site. All post data, etc, for each sub-site will be stored in the corresponding new set of tables.

    However, there will be folders for each site where media items are uploaded in wp-content/uploads

    Your wp-config.php & .htaccess are default configurations, and if you have set up the wildcard sub-domain, it is likely a matter of waiting for propagation which can actually take an awful long time.

    The first time I set up a sub-domain install, that's what threw me too.. It about 36 hours. :slight_frown:

  • Ash

    Hi @JosiahW

    Are you using any dedicated hosting or VPS? Then did you install lamp package by yourself? If yes, in that case you need to make a change in your host file.

    <Directory /var/www/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride None
                    Order allow,deny
                    allow from all


    <Directory /var/www/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all

    Please let me know.