Subdomains vs Subfolders
Best Free Web Hosts
- 150m - 150MB Web Space / Ads
- 20m - 20MB Disk Space / Ads
- StormLoader - 50MB Web Space
What Are Subdomains?
Technically, a subdomain is any division of the Domain Name System (DNS). This means that top-level domains (TLDs) are, technically speaking, subdomains because they divide up the Internet into .com, .net, .org, etc. Domains such as ed.gov or jetblue.com make up the next level of subdomain, then there are divisions of the domain, and so on down the hierarchy. However, in common speech, subdomain refers to the third division, the level in this hierarchy that comes after domain names.
Entire Domain | The Internet |
Top-Level Domains (TLDs) | .com |
Domain names | nytimes |
Subdomains | autos, jobmarket, travel, health |
I have placed each level down and to the right to indicate the hierarchy in the chart. But in an actual URL (Uniform Resource Locator), each subdomain appears to the left of the level above, so these New York Times URLs would look like this:
autos.nytimes.com
jobmarket.nytimes.com
travel.nytimes.com
health.nytimes.com
That is, subdomains precede the domain name and are separated from it by a dot.
What Are Subfolders?
Subfolders are an organizational strategy for grouping material on a website, both for the webmaster and for the reader. Subfolders should aid the visitor in understanding exactly what each page is/does, with brief, evocative descriptions. Unlike subdomains, subfolders are hierarchy divisions that are placed to the right of the TLD. This is a quick way to be able to identify the different structuring methods a website is using.
For example, on the New York Times site, not all divisions are subdomain divisions. There are also subfolders, for example:
nytimes.com/pages
This subfolder has its own set of subfolders including: world, national, nyregion, business, technology, science, health, sports, opinion, arts, style, and real estate, and these appear to the right of the folder, pages, like this:
nytimes.com/pages/technology
That is, subfolders follow the domain name and are separated from it by a slash. Subfolders of the original subfolder are also separated by a slash and placed to the right.
When to Use Subdomains and Subfolders
Subdomains are, in general, used to indicate major subdivisions of a site. When we're talking about sections of pages, major means sections that run to thousands or tens of thousands of pages. You can see from the New York Times examples given above that not every division of the website is a subdomain. Only the very large ones are, while the majority of divisions exist as subfolders.
Another reason to separate a section of a site by using a subdomain is if it has a very different function or different type of file. This includes the ability to designate individual host servers, as well as separate functions such as mail and File Transfer Protocol (FTP). For example, Google has separate subdomains for maps, video, news, groups, and images:
maps.google.com
video.google.com
news.google.com
groups.google.com
images.google.com
However, Google's International section, its Accounts section, and its Help section, are all set up as subfolders:
google.com/intl
google.com/accounts
google.com/help
Subdomains are also typically used to specify a server cluster. For example, the National Education Association "higher education" (he) subfolder is on a server cluster designated www2, so its web address looks like this.
www2.nea.org/he/
Another use for subdomains is the private sites of individuals under a larger domain. This is usually the case with free web hosting.
Another element to consider in choosing subdomains and subfolders is how a server handles subdomains and subfolders. It has been pointed out that in the Internet Information System (IIS) used by Windows servers, subdomains are treated as unique websites and can therefore have independent settings for performance, logging, authentication, etc. In this case, the choice has added significance.
Related article: Domain Names