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 to the browser virtually when that site is requested. From a technical standpoint, subdomains require an extra step in server setup for the wildcards. Chapter 1 in this minibook covers setting up wildcard subdomains on the server side. Subdomains are somewhat separated from the main domain, at least in terms of content. Subdirectories, on the other hand, are part of the main domain, as if they were a page off the main site.

The terms subdirectory and subfolder are interchangeable, but we stick to subdirectory for the purposes of this book.

Because each site's URL is saved in its tables in the database, after you pick which subsites you want to create, you cannot switch this without reinstalling the network.

Each site format offers certain search engine optimization benefits. Search engines read subdomains as separate sites on your Web host; therefore, they maintain their page rank and authority and multiple results for your domain are listed. Subdirectories are read as pages or sections off your main domain, help the main domain's page rank and authority, and provide one result for your domain in search engines.

image If you want your extra sites to have separate domain names, you still need to pick one of these options. Chapter 6 of this minibook covers top-level domains.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.49.54