Google ranks subdomains more or less the same as subdirectories (also referred to as subfolders).
But there’s a key difference, in that subdomains are considered standalone sites and distinct from the main domain.
It’s important to consider the practical impact on your SEO before choosing to place content on a subdomain or a subdirectory.
The Difference Between a Subdomain & Subdirectory
What Is a Subdirectory?
A website is typically made up of different category sections and web pages.
In the old days of HTML coding, a web designer would create folders and put the web pages into those folders.
That’s why they are called “subfolders“ or “subdirectories.”
This is very similar to how file storage works on a desktop computer, where you create folders and put images or spreadsheet files into the folders.
Just like your desktop folders, the online folders would have a name like /green-widgets/. That’s where all the green widget HTML pages would go.
When you navigated to those pages, you would literally be navigating to a folder and an actual HTML file:
Those folders, /widgets/ and /green-widgets/ are called subdirectories or subfolders.
In typical WordPress and other PHP-based websites, those subdirectories are virtual.
They don’t exist on the server where you can navigate to them with an FTP program and see the actual folders.
Though virtual, they are still a part of the file structure of the website and are still called subdirectories.
What Is a Subdomain?
A subdomain is very different from a subdirectory; it is like an entirely different website.
The subdomain is associated with the domain, but not the website that is associated with the domain name.
A subdomain is generally considered as a standalone site that is branched off from the main domain.
This is an example of a subdomain:
This is an example of a subdomain that contains a subdirectory:
Google Considers Subdomains as Separate Standalone Sites
Google has always treated subdomains as different sites, separate from the main domain.
This is evident within Google Search Console, where subdomains have to be verified separately from the content that exists under the main domain website.
Google’s John Mueller explained this in a Webmaster Video:
“You’ll need to verify subdomains separately in Search Console, make any changes to settings and track overall performance per subdomain.
We do have to learn how to crawl them separately but for the most part that’s just a formality for the first few days.”
When to Use a Subdomain
There are technical, branding, and SEO implications as to why a publisher would choose to host content on a subdomain.
Technical Reasons to Use a Subdomain
A web developer may choose to host a staging version of a website on a password protected subdomain (a staging site is a copy of a site created by the developer in order to test a new web design template).
It’s easy to set up a new database and install a new version of a site in that subdomain that exactly replicates the production site (the version of the site that visitors visit).
As long as the subdomain is not linked from anywhere on the web, search engine crawlers will generally not find that subdomain. If they do, they won’t be able to crawl the staging site because it is password protected.
On a technical level, the staging site hosted on a subdomain can have the same directory, URL, and permalink structure as the main site that is live on the web.
Hosting a staging site on a subdirectory is trickier and errors in link structure can creep in.
For technical reasons, developers may find it easier to create a new database for a subdomain and treat that section like an independent website, keeping all database and CMS files completely separate from the rest of the main site.
Splitting out a site on a subdomain allows the developer to easily use 100% different layout templates and technologies without affecting the main site.
Branding Reasons to Use a Subdomain
Branding is another reason to use a subdomain.
For example, publishers often choose to host their support sections on a subdomain.
There, a user can find downloadable documentation, FAQs, and Q&A forums under a subdomain like support.example.com
For branding purposes, some businesses may elect to create a separate subdomain to compartmentalize and brand a section of their site such as the support pages and keep them away from the rest of the main site.
SEO Reasons to Use Subdomains
There may also be SEO reasons for hosting on a subdomain; for example, if a publisher has a content topic that is completely different from that main site.
The publisher can choose to host that section on a subdomain in order to isolate that content within its own website but still be within the brand of the main site.
Some news sites host their recipe content on a subdomain, for example.
I don’t know if that’s done for SEO reasons but it’s an example of how to separate one section of a site that has a vastly different topic from the rest of the site, where one section is static and relatively evergreen and the rest of the site is in a constant state of change.
By separating the recipe section from the rest of the site, a publisher can control what that entire section is about (recipes) and not allow the rest of the site to influence or overwhelm that one section.
Whether Google can rank a subdomain section better if it’s isolated is a matter of opinion.
But this is something that is done for SEO reasons, to allow a subdomain to rank on its own without influence from the main site and vice-versa.
Below is the SERP display for The New York Times’ recipe subdomain section.
When you search for “recipes NYTimes” Google displays it in the SERPs like a standalone website, complete with a six-pack listing of subsections.
Subdirectory Layouts Are Useful
A site that is comprehensive can be seen as more authoritative than a site that only focuses on a granular part of a topic.
That doesn’t mean that the granular site less authoritative or useful.
But a site that can encompass the full breadth and depth of the topic can attract more links and be recognized as authoritative.
For that reason, a site might choose to use subfolders over a subdomain approach.
Another reason to use a subdirectory layout is that there is overlap between different sections.
Someone shopping online for cereal may want to pick up a pair of gym pants to use while working from home.
A site that carries both items is more useful than a site that only focuses on one or the other.
Subdirectory or Subdomain? Choose What Works Best
The most important consideration for whether to use a subdomain is if it works for users.
Even so, the SEO, branding, and technical advantages of each need to be considered.
In general, if it makes sense for users that a section belongs with the rest of the site, then using a subdirectory structure is the best way to structure a website.
But if the section is better as a standalone site because it is so different from the rest of the site and you want it to keep associating that section with the branding or name of the main site, then a subdomain might be the better approach for you.
Sometimes, there just isn’t a definitive answer as to which way is best. But by taking all these factors into consideration, the choice becomes easier to make.
All screenshots taken by author, December 2020
Roger Montti is a search marketer with 20 years experience.
I offer site audits and link building strategies.