The URLs and the navigation of a site do matter for SEO but the elements of site structure that affect SEO don't end here. For example, take sub domains and sub directories. These are another example of a site's structural elements that do influence how Google ranks results. While the difference between when a page is in a sub directory (also called a sub folder) vs when it's on a sub domain might not be always huge, there are cases when it really matters if you use sub domains or sub directories.
The Difference Between a Sub Domain and a Sub Directory
Before we discuss the advantages and disadvantages of sub domains and sub directories for SEO, let's clarify the difference between them.
Basically, when you use sub domains, your URLs will look like this:
Notice the 'subdomain' part before your main domain. This part tells Google and your visitors that the contents in the sub domain is separate from the contents of the rest of your site. A typical use for sub domains is for a business site where the blog is separate from the rest and it resides on a subdomain of its own ‐ i.e. blog.companysite.com. Sites with forums (and other content, for instance articles) also frequently separate the forum part on a sub domain, such as forum.contentsite.com.
Unlike sub domains that precede the domain name, sub directories follow it. Like this:
The difference is not purely in the syntax. It goes beyond that and it's related to the type of content you have. There isn't a rule when to use sub domains and when to use sub directories but basically if the content is a good candidate for a separate site, then you go with sub domains. If the content isn't that much different from the main content, you go with sub directories. For instance, if you have a blog about web design, you can have separate sub directories for tutorials, free stuff, your artwork, etc., but put the shop where you sell templates and designs on a separate domain.
SEO Benefits of Sub Domains
It's hard to say if sub domains are better for SEO or not because it depends on many other factors. However, one of the cases when you would benefit from a separate domain is when you have multiple pages for a single keyword.
Google usually limits the number of search results per domain, unless they are very relevant but this doesn't apply to sub domains. In other words, if you had a domain with sub directories and you have 10 relevant results, most likely Google will show only 2 or 3 of them, while if you had 5 sub domains, chances are 2 or 3 results per sub domain (or 10-15 altogether) will be shown. However, don't take this for granted and don't rush to sub domaining just to trick Google to show more results from your site ‐ this might not work and you will have wasted your time and effort.
Another advantage of sub domains for SEO is that you can put your keywords as sub domain names. This is especially good, if your main domain name lacks them ‐ i.e. if your main domain is healthsomething.com but you have lots of stuff about addiction, it makes sense to create a separate sub domain addiction.healthsomething.com with your keyword in it. Of course, you can do this with sub directories as well but somehow a separate sub domain with your keywords has more weight.
SEO Drawbacks of Sub Domains
The advantages of sub domains for SEO are tangible, however they also have drawbacks. For instance, sub domains are harder to set and manage.
Another disadvantage, and it's a major one, is that sub domains don't always inherit metrics from the main domain (i.e. if your main domain is PR5, your sub domains could be PR0 because for Google both are not closely related). In many cases, this alone is enough to make you give up the idea of using sub domains at all ‐ since the sub domains are not inheriting metrics, this means you practically have to optimize them from scratch.
SEO Benefits of Sub Folders
If you expect a longish list of SEO benefits of sub folders, there is no such list because basically sub folders have only two advantages.
First, similarly to sub domains, with sub folders, you can have the keyword in your URL. Second, sub folders inherit the metrics of your root domain, which means that if your site is doing well on a whole, any content in a sub folder automatically benefits from this, while with sub domains you might have to start your SEO efforts from the very beginning.
SEO Drawbacks of Sub Folders
The main SEO disadvantage of sub folders is that they could limit your exposure, if search results are already saturated with pages from your site. As I already mentioned, Google generally limits the number of search results per domain to 2 or 3, so if you have more pages that are relevant, they might not show in the main search results.
When to Use a Sub Domain and When to Use a Sub Directory?
Use sub domains for larger topics ‐ i.e. if you have a health site, it makes sense to create separate domains for each major group of diseases (i.e. cardiovascular, respiratory, etc.) and then create a sub folder for the separate diseases in this group (i.e. heart attack, flu, etc.)
Also, as already mentioned, if your site has a forum and or/a a blog in addition to your corporate pages, you should use sub domains for the forum and the blog ‐ i.e. forum.domain.com and blog.domain.com.
Of course, these are just general recommendations and you don't have to follow them blindly. As usual, the ultimate test is to try and see what works for you and what doesn't.