Subdomain Vs. Subdirectory: Why The Subdirectory Wins at SEO

The question of whether a subdomain or a subfolder is the better choice and which has a better ranking benefit in Google is frequently discussed.
SIA Team
July 20, 2021

Subdomain vs subdirectory is often debated as to which of the two is the best choice and which has a better ranking benefit in Google web search. With Mobile First and the Page Experience Update of May 2021, the subdirectory option is more appealing. Here’s why.

First, Let’s Define Subdomains and Subdirectories

Basically, the word subdomain in the sample url below designates a subdomain, so the subdomain structure (for the URL) would look like:

subdomain.domain.com

The word subdirectory in the sample url below designates a subdirectory:

domain.com/subdirectory

The word subfolder can be treated as a synonym for subdirectory, so I’ll use the two interchangeably.

Mobile First and Why Subdirectories Are Preferable to Subdomains in Today’s Search Engine Optimization

mobile first

Why do I say that, for search engine optimization in the post-Page Experience era, that the subdirectory/subfolder is the preferred option?

Let me build my case:

1.   When you think of search engine optimization, you want to get the best search engine results for your main site, which is mapped to your primary domain.

2.   It’s been known that a subdomain is treated almost like a separate entity, or separate site.

3.   A subdirectory (or subfolder) is seen as part of a file system under a domain (and if it’s the main domain, then the subdirectory is seen as part of your main website). This is in a bit of contrast to the subdomain sites, which is sometimes thought of as part of a separate site (even though, technically, it’s under the same main domain).

4.   If you understand the following point (in the context of everything else I’m going to explain), you’ll know why the subdirectory option is the most convenient and efficient option for SEO: there’s a big difference between Mobile-Friendly and Mobile First.

It’s one thing to have a mobile-friendly site (or a subdomain of your site that was mobile friendly). For some sites that have mobile-friendly sections, the subdomain m (as in m.domain.com) was a preferred option: the site was coded to detect whether the visitor was on a mobile device, and would thus redirect them to the mobile-friendly version.

That said, I should say that there are some sites that don’t need to have separate versions, because the main site displays well on mobile and desktop devices. (This may be due to a number of things, such as simplicity of design and CSS instructions.)

This is very much in line with a Mobile First approach.

Mobile First doesn’t mean that you have a mobile version and a desktop version of your site (as implied with mobile-friendly). What it means is that, basically, you should design the main version of your site (your main domain) to be mobile-friendly first, before you begin to wonder how it’ll look on a desktop device.

You can also think of it this way: Google will use the mobile version of your site to determine your SEO ranking first, before your desktop version.

Before, it was understood that Google indexes both versions of a site. However, at the time that I’m writing this, the Page Experience update is still relatively new (last month), and we’re still uncertain whether that’ll continue to be the case.

But regardless, we should consider that Google will start using the mobile version of our sites as the one it grades for ranking.

That’s the big difference I was referring to earlier: instead of a desktop and mobile version (which may have been graded differently), the mobile one is the one that’s used first (hence, Mobile First). In fact, you may not even need a desktop version, because the mobile one will be used for both mobile and desktop browsers.

Subdomains Vs Subfolders: Which is Better for SEO?

In this 2017 video, titled Subdomain or subfolder, which is better for SEO? Google’s John Mueller basically states that it doesn’t really matter whether you use subdomains or subdirectories, as Google treats subdomains and subdirectories the same, and search bots don’t have much of a problem either way.

He mentioned that different server configurations may make one or the other an easier option.

He also went on to:

  • State that subdomains should be verified separately in Google Search Console (and probably also separately in Google Analytics)
  • Advise making appropriate changes to settings
  • Advise tracking overall performance per subdomain

This is important: He also said that site owners should think long-term, and pick one option that they can stick with whether to go for your own subdomain or a subfolder of your site. (This makes sense, because moving from one configuration to the other can be a hassle, and it might take a while before the search engines can re-index a site that’s had its structure changed.)

Those are some valid points, and I don’t mean to marginalize what he said, but…

…that was in 2017, well before the Page Experience update of May/June 2021 and the reality of Mobile First. So, while I agree with most of what he said, I think that, for the most part, subdirectories/subfolders are preferable.

Hey! Don’t Discard The Notion of Subdomains. Here Are Some Specific Reasons to Use Subdomains

While this list isn’t exhaustive, it is a starting point:

  • If you’re creating a site where you’ll allow others to create their own website on your domain, you may want to set it up so that the sites others create are on a subdomain.
  • Below, I talk about the sandbox concept. It’s borrowed from computer science, where you set up a part of a computer system (in this case, a root domain and its associated folder structure) and have a portion of that system separated from the rest. That is, it has fewer permissions and less access to the rest of the system. This sandbox is used as a testing area.
  • If you want to give people restricted access to your domain, you can set up a subdomain, which, depending on folder configurations, should limit access to the other folders in your main domain and other subdomains.

What About WWW? Isn’t That a Subdomain?

Yes, www is a subdomain. It was a lot more prevalent during the earlier days of the Web, but nowadays, unless you have a very specific need for www, it’s not really prevalent anymore. If a site does happen to use www, usually the site will have a redirect set up so that even if you don’t type the www, you’ll be sent to the www version. For www sites, it’s often enough to just mention the url without the www, as the redirect will take the visitor to the proper version.

SIA Test #45 – Subdomain vs SubDirectory for Multi-Language Sites

Multi-Language Sites

If you look at the url structure of some multi-lingual sites (Wikipedia.org being a prime example), you may have noticed that:

The English version is: https://en.wikipedia.org/

The Français version is: https://fr.wikipedia.org/

The Español version is: https://es.wikipedia.org/

In each case, you’ll see that there’s are multiple subdomains (en., fr., and es. respectively) that is used to designate the different language versions of the main domain, wikipedia.org.

But, is that the best way, or the only way, to structure a multi-language or multi-location site?

At the SEO Intelligence Agency (SIA), one thing we do is test a number of SEO-related variables to try to identify the best way to do things. By variables, I mean that in the context of the Scientific Method.

Using the Scientific Method, we set up an experiment where we change the independent variable (in this case, the use of subdomains vs. subdirectories) to determine the outcome of the dependent variable (in this case, which one ranks better).

In this video, Clint talks more about the test and his thoughts on the results: https://www.youtube.com/watch?v=EtM2Ml_YZmU

So, which one won? It turns out that subdomains won. But…

…there may be time- and money-saving reasons why you may still wish to go for subdirectories, even if you have a multi-language or multi-national site.

I’ll explain in the next section.

Using Subdomains May Multiply Your SEO Workload

Recall that, although Google can index subdomains and subfolders with equal ease, and search algorithms are accommodating of each, subdomains have to be entered into Google Search Console separately.

Why?

Because some in the SEO industry think that the search engines (particularly Google) see subdomains as separate sites. Even our expert, Clint, in the video above, alludes to the notion that subdomains can be thought of as separate sites.

That’s one small example of how using subdomains can multiply your work. But it goes beyond that: If you wanted to rank the separate versions of your site (say, the subdomains that pertain to the different languages or national versions of your site), you’d have to essentially do SEO on each subdomain as if it were a separate site.

On the other hand, from an SEO perspective, if instead of using subdomains, you used subfolders of the same root domain, you would have to only do SEO for one site. Your site’s URLs would be based on one inherent URL structure.

That is, all the SEO you did across the different subfolders (which would pertain to the different national versions or languages of your site) would consolidate the main root domain, and there would be a synergistic benefit across your multilingual or multi-national site. Domain Authority would be stronger on your parent domain, and your internal links might also result in higher search rankings. Your SEO strategies, such as careful link building, would work much more efficiently.

How to Choose Between Subdomains and Subdirectories: 6 Deciding Factors

1.   Server or hosting capability. For a single domain, most hosting companies should be able to easily accompany subdomains or subdirectories, so this shouldn’t be an issue.

2.   Content Management System. WordPress, which is one of many CMS’, is more accommodating of subdirectories than subdomains. (Indeed, it basically can create subdirectories to segment its blog content.) To have WordPress on separate subdomains would require separate WordPress installation on each separate subdomain.

3.   Considering the above point, you could have your blog content on a blog subdomain, ie: blog.mysite.com. That can work as well.

4.   Consolidation of SEO effort. I mentioned above how having a root domain with subdirectories is preferable. If this is important to you, then consider subdirectories.

5.   You can have both subdomains and subdirectories. (I expand on this below.)

6.   I always talk about the user experience, but really, even though the subdomain option requires more work, it can ultimately have no difference as far as the user is concerned.

Don’t Sweat It: You Can Add Subdomains Later…and Even Have Subdomains and Subdirectories!

Sandbox

I should apologize for something: Up until now, I’ve made this whole subdomain-vs-subfolder issue an entirely either-or proposition, but it doesn’t have to be that way. It can actually be a both-and proposition.

Here’s a story that illustrates the validity of the subdomain approach.

A number of years ago, I used to work in the office of another Internet marketing company. We’d always be working on one of our sites, and of course, before we went live with any large changes, we’d always have a test version.

We called our test versions the sandbox, and, if recollection serves me well, we had a subdomain called sandbox (so the address would be sandbox.oursite.com).

Because subdomains are seen as separate sites, you can configure them to have more restrictions and less access to the main, root domain. This is great for security and testing purposes: if something goes wrong, the limited access of the sandbox will not adversely affect the live site on the primary domain. That’s a key technical reason why you may want to use a subdomain.

It’s advisable to have a noindex instruction for your sandbox site, so that search engine crawlers don’t index it, thus hopefully preventing organic traffic isn’t sent to your testing site. Your webmaster can easily figure out how to add noindex to a robots.txt file.

When it comes to the site structure question – which is better, subdomain or subdirectory, I think you now have a better grasp of how to make the decision for your site. Just remember that it’s not set in stone and if necessary, if you’re willing to put the work in, you can make a change. It would really be up to your preference, the application, and the amount of work you are willing to take on.

Want to learn tried and tested SEO information that has been tested and proven to help you get ranked in the SERPs? Need more tips and tricks to help your SEO agency or business come up with a SEO strategy that will get you top SEO rankings? Check out our other articles or better yet, join SIA for the latest test information and be part of our SEO community with SEO experts and professionals in the quest of discovering what’s what in search engine optimization.

DK Fynn
SIA STAFF SEO WRITER