When trying to structure a website, there’s been a long-standing debate over the use of subfolders compared to subdomains, and which one is better for SEO, Does it actually make a difference? If a blog is hosted on a subdomain, should you migrate it into a subdirectory? What’s Google’s stance on this?
To help get to the bottom of whether a subdomain or subfolder is better for your SEO, here’s a thorough examination of the issue. Let’s start with definitions to get a clear picture of what subdomains and subfolders are in internet parlance.
What are subdomains?
A subdomain is an additional part to your main domain name. Subdomains are created to organize and navigate to different sections of your website. You can create multiple subdomains or child domains on your main domain.
For example: store.yourwebsite.com
In this example, ‘store’ is the subdomain, ‘yourwebsite’ is the primary domain and ‘.com’ is the top level domain (TLD). You can use any text as your subdomain, but you want to make sure it’s easy to type and remember.
What are subfolders?
A folder is a storage space where many files can be placed into groups and organize the computer. A folder can also contain other folders which are called subfolders. All folders are subfolders, or subdirectories of the root directory. For example, https://www.example.com/widgets/green-widgets/big-green-widget.html. Those folders, /widgets/ and /green-widgets/ are called subdirectories or subfolders.
Subdomains vs subfolders: What’s the difference?
Subdomains and subfolders are similar in a lot of ways. They’re both file locations inside of a server’s ‘Home’ directory structure and the Home directory for our purposes happens to be a URL.
A subfolder is a ‘child directory’ (a folder beneath another folder) that lives under a parent (Home) directory, as is a Subdomain. But the subtle differences that come into play here are where things start to get interesting.
While both are content repositories, subdomains are also URLs which means you can access them just like a regular website address. They’re not just paths within a domain like subfolders are. It’s this difference that affects your website’s ability to gather and rank keywords.
Subdomains are considered as separate 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.
Also, Search engines recognize subdomains as completely separate web addresses from your root domain. So, you can use your subdomain to get new traffic and send them to your main site. Having another domain with different content can also help you build backlinks for your main site.
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.
1. 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.
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.
2. 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.
3. 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.
For example some news sites host their recipe content on a subdomain. 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.
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 is 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.
Summary
You would have full control over whether subdomains or subdirectories are used for various areas of your site. But the reality is that it’s usually not quite that simple, and it’s common that compromises must be made based on technical limitations.
subfolders are best for SEO due to the different metrics being returned by various search engines. It only advocates using a subdomain for foreign language variants of a main website, if needed.
Subdomains are also great if you have content that’s thematically very different from rest of the content on your site. Website architecture is always going to be a matter of necessity and taste, but in most cases, you’ll probably want a subfolder structure versus a subdomain.