Historically, it’s been kind of a wash about when to use subdomains vs. subdirectories. Just as a reminder, in a URL such as subdomain.example.com/subdirectory/ , the subdomain is “subdomain” and the subdirectory is “subdirectory” (also sometimes called a folder). If you’re still unclear, you may want to read my tutorial on the parts of a URL.
If you throw your content into a subdirectory, usually the code is all in the same file storage space. That can make it much easier to find/edit/change code. It can also be easier to move code from one place to another. A subdomain, however, is often a domain name system (DNS) alias. Subdomains can be a little more difficult for a novice webmaster to set up, especially if words like “CNAME” don’t mean anything to you. Subdomains can be managed separately, which can be a joy (you can use DNS to decouple a subdomain if you want to migrate that part of your site) or a pain (it may be more of a hassle to juggle DNS setting instead of just using file commands to make or move directories). When I started my blog, I decided to use a subdirectory (mattcutts.com/blog/) just to keep things simple, for example.
For several years Google has used something called “host crowding,” which means that Google will show up to two results from each hostname/subdomain of a domain name. That approach works very well to show 1-2 results from a subdomain, but we did hear complaints that for some types of searches (e.g. esoteric or long-tail searches), Google could return a search page with lots of results all from one domain. In the last few weeks we changed our algorithms to make that less likely to happen
in the future.
This change doesn’t apply across the board; if a particular domain is really relevant, we may still return several results from that domain. For example, with a search query like [ibm] the user probably likes/wants to see several results from ibm.com. Note that this is a pretty subtle change, and it doesn’t affect a majority of our queries. In fact, this change has been live for a couple weeks or so now and no one noticed. 🙂 The only reason I talked about the subject at PubCon at all was because someone asked for my advice on subdomains vs. subdirectories.
My personal preference on subdomains vs. subdirectories is that I usually prefer the convenience of subdirectories for most of my content. A subdomain can be useful to separate out content that is completely different. Google uses subdomains for distinct products such news.google.com or maps.google.com, for example. If you’re a newer webmaster or SEO, I’d recommend using subdirectories until you start to feel pretty confident with the architecture of your site. At that point, you’ll be better equipped to make the right decision for your own site.
Update: Made it more clear that this change has already been live for a while.