Exploring the Difference between Subdirectories and Subdomains

Before you start setting up the network, the Create a Network page lets you choose the URL format of sites you are adding beneath the Addresses of Sites in your Network heading. By default, these sites are in subdomain format (subdomain.yourdomain.com) or subdirectory (yourdomain.com/subdirectory) format.

Figure 2-2 shows both choices displayed via radio buttons.

Figure 2-2: Choosing subdomains or subdirectories.

image

In some cases, depending to your setup, your choice here may be limited. WordPress does some autodetection with information about your installation and may prevent you from choosing an option that won't work with your setup.

Table 2-1 explains some of the situations you may encounter.

Table 2-1 Common Network Setup Situations

Situation Format
Site URL is different than Home URL. Network cannot be enabled.
Site URL is http://localhost. Subdirectories only.
Site URL is an IP address.
WordPress is installed in a folder (for example, http://domain.com/wp).
Install is more than 30 days old. Subdomains only.
WordPress is installed in the root of the domain (http://domain.com). Subdomains are default, can choose either.

Site addresses generate in a similar way. They don't really exist and you won't see these site addresses in your directory structure on your Web server because they are served ...

Get WordPress® All-in-One For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.