WordPress.org

Ready to get started?Download WordPress

Forums

Subdomains on locally hosted multisite? (3 posts)

  1. cryssybee02
    Member
    Posted 5 months ago #

    I have multi-site set up on a locally hosted WordPress installation using IIS.

    To get it to work on my local setup, I changed my local site to a fake domain ("localhost.com:80"), and edited my hosts file like so:

    127.0.0.1 localhost.com

    Now I can create sub-domains, but I can't view them. Going to the new site or trying to access the its dashboard gives me a 404 error.

    I tried updating my hosts file with my sub-domains like so:

    127.0.0.1 localhost.com
    127.0.0.1 sub1.localhost.com
    127.0.0.1 sub2.localhost.com

    But that just gives me the IIS placeholder page instead.

    I'm at a loss as to how I can get this sub-domain thing to work. Switching to sub-folders would be an absolute last resort for me.

  2. jkhongusc
    Member
    Posted 5 months ago #

    What you did with your hosts file is correct in routing your request for the sub-domains to your local system.

    You probably did not configure IIS to handle the subdomains which is why you are getting the 404 errors. One quick way to check... your main site login page should be http://localhost.com/wp-login.php, try http://sub1.localhost.com/wp-login.php

  3. cryssybee02
    Member
    Posted 5 months ago #

    I checked http://sub1.localhost.com/wp-login.php

    When the subdomain is listed in my hosts file, I get an IIS generated 404 page.

    When the subdomain is NOT listed in my hosts file, I get the generic Firefox cannot find sever notice.

Reply

You must log in to post.

About this Topic