A domain-based or path-based network?

Previously on the CogitActive Saga:
The benefits of the Multisite feature – its amazing management capabilities, in particular – convinced me.

WordPress Multisite

After deciding on WordPress Multisite to operate several personal websites, I had to address additional considerations before to create the network. In particular, I needed to choose a network structure, or in other words, how I wanted the network to handle Uniform Resource Locators (URLs). I could either opt to have each site with a different subdomain, namely a domain-based network. Alternatively, I could go for a path-based network, where each site has a different path.

Deciding if you wanted to use subdomains or subdirectories (i.e. paths) is mainly a personal preference – except when imposed by some restrictions1. Yet, there are some reasons not to treat this decision lightly. First, the same structure is used throughout the network – you can’t pick and mix2. Second, even though it is possible to switch between both (after installation), reconfiguring your network may be tricky and is something best avoided. So, which structure – subdomains or subdirectories – is best for a small private Multisite network?

Domain-based network

In this configuration, also known as subdomains installation, each subsite has a different subdomain:

subsite1.domain.com
subsite2.domain.com

Therefore, a page called “About” will have the following URL:

https://subsite1.domain.com/about/

This option is generally recommended when you allow end users to create new sites on demand – not my concern (see Multiple installations vs WordPress Multisite?). It is also the only option available if your WordPress installation is more than a month old – again, not my concern. Apparently, it is the more popular option (and recommended structure)3 – a statement not shared across the board, though.

Anyway, as explained in Before You Create A Network, this domain-based network is a little bit more involved than its alternative. Indeed, it requires some extra configuration steps in order to map different sub-domains to the same directory in the server’s file system where WordPress is installed. In addition, WordPress must run from the root of your webfolder (i.e. public_html) for subdomains to work correctly.

Path-based network

In this configuration, also known as subdirectories installation, each subsite has a different path:

domain.com/subsite1
domain.com/subsite2

Therefore, a page called “About” will have the following URL:

https://domain.com/subsite1/about/

This option is described as easier to work with2 because it doesn’t involved any of the extra configuration steps mentioned earlier. Moreover, in contrast to the domain-based installation, there is no requirement, but using Pretty Permalinks in your site.

This structure also comes with certain Search Engine Optimization (SEO) benefits. As subdirectories are parts of the main domain in terms of content, they are affected by the main site SEO, and vice versa. This option can therefore be advantageous for subsites that won’t have enough unique content to rank well on their own.

There are however caveats with this approach. First, the main site allows blog posts to be accessed only from the following URL pattern:

https://example.com/blog/[postformat]/

There are workarounds for this issue, but the WordPress codex does recommend not removing the “blog” slug. A related limitation with the path-based structure is that you can’t use some name for your subsites, such as “page”, “blog”, “feed” and so on, as these names are already used in WordPress by default. Last, but not least, if you create a static page in the main site, with the name of an existing subsite, the page’s permalink will get a suffix:

https://example.com/pagename-2/

Conversely, if you create a new subsite with the name (i.e. slug) of an existing static page, the latter will not be reachable anymore.

Decision

Regrettably, I could not find any clear answer to my initial question. Moreover, insofar as none of the restrictions applies to my configuration or use case, neither option was self-evident. I was still undecided, until I watched this short video by Neil Patel.

by Neil Patel

As my sites would have different focus, while still being related to my main site, I decided to go for a domain-based network. Granted, the blog was perhaps the only exception to my non-related topic claim. Thus, my main site could have benefited from it as a sub-directory installation SEO-wise, or vice versa. Alternatively, I could have created the blog within my main site. Yet, I didn’t because I like things to be neat.

To be continued…


1 There are some situations when you have no choice in the matter, as explained in Before You Create A Network. For instance, you can’t choose a path-based network if your existing WordPress installation has been set up for more than a month. Similarly, the domain-based network option will not be available in some specific cases. Nonetheless, as stated in another article of the WordPress codex, you can switch between domain-based and path-based installations afterward. ^
2 Rachel McCollin (2017) WordPress Multisite: Subdomains or Subdirectories? wpmudev. ^
3 Lisa Sabin-Wilson (2017) WordPress All-in-One For Dummies – Third Edition. Hoboken, New Jersey: John Wiley & Sons. ^

What do you think?
  • Like 
  • Agree 
  • Disagree 
  • Thank you