• hello,

    ive just set up my account to have a network, and i would like my secondary site to have the root hidden so it looks like its own separate domain. is this possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, if I understand your question, you have a multisite set up using subdirectories, so the URLs look like:

    Root: https://www.example.com
    Second site: https://www.example.com/site2
    Third site: https://www.example.com/site3

    Where site2, site3 and so forth are the names that you give the child sites.

    Within WordPress you can change these so they would appear:

    Root: https://www.example.com
    Second site: site2.example.com
    Third sitee: site3.example com

    and so forth, with the subdomain being the name given the child site.

    You can do this by going to your wp-config.php file and looking for the following line:

    define( ‘SUBDOMAIN_INSTALL’, false);

    Change it to:

    define( ‘SUBDOMAIN_INSTALL’, true);

    On any child sites you’ve created you may need to go to Settings > Permalinks, which will refresh the rewrite rules.

    If you want to give the child sites their own separate domain names, though, such as:

    Second site: https://www.somedomain.com
    Third site: https://www.anotherdomain.com

    You’ll need to purchase those domains and map them to the child sites. You don’t change anything in wp-config.php to do this. Instead, you need to install and set up a domain mapping plugin such as MU Domain Mapping (https://www.ads-software.com/plugins/wordpress-mu-domain-mapping/).

    Hi, if I understand your question, you have a multisite set up using subdirectories, so the URLs look like:

    Root: https://www.example.com
    Second site: https://www.example.com/site2
    Third site: https://www.example.com/site3

    Where site2, site3 and so forth are the names that you give the child sites.

    Within WordPress you can change these so they would appear:

    Root: https://www.example.com
    Second site: site2.example.com
    Third sitee: site3.example com

    and so forth, with the subdomain being the name given the child site.

    You can do this by going to your wp-config.php file and looking for the following line:

    define( ‘SUBDOMAIN_INSTALL’, false);

    Change it to:

    define( ‘SUBDOMAIN_INSTALL’, true);

    On any child sites you’ve created you may need to go to Settings > Permalinks, which will refresh the rewrite rules.

    If you want to give the child sites their own separate domain names, though, such as:

    Second site: https://www.somedomain.com
    Third site: https://www.anotherdomain.com

    You’ll need to purchase those domains and map them to the child sites. You don’t change anything in wp-config.php to do this. Instead, you need to install and set up a domain mapping plugin such as MU Domain Mapping (https://www.ads-software.com/plugins/wordpress-mu-domain-mapping/).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘hiding root directory for second site’ is closed to new replies.