It is kind of a historical – so to speak – debate, which continues for years and often returns to the center of SEO issues: is it preferable to have a site with sub-domain structure or use subfolders? What is the best choice for browsing and which offers the greatest opportunities in terms of visibility on Google? We anticipate that, in reality, the search engine in most cases does not have a clear preference and much depends on the type of site and overall management, but let’s see what subdomains and subfolders means and what are the best practices to follow.
What subdomain means
A subdomain is a subordinate domain – a subset or partition – of a larger and considered main domain, which operates almost as an independent entity.
To give the simplest example, the main domain is site.com, while the subdomain is blog.site.com.
Generally speaking, we can say that a subdomain is like a completely autonomous website that branches off from the main domain and may represent a specific section of the site: its common function is to accommodate a different functionality or topic than the main domain one, which are then treated separately.
Cases of subdomains use
A subdomain is associated with the main domain, but is located outside of it because it is hosted within its own partition, and is therefore not associated with the website that refers to the domain name.
In essence, a subdomain is a child of the parent domain and usually serves to host:
- Blogs
- E-commerce stores (when they are part of a larger website)
- Internationalization (versions in other language of the site, which targets a different market)
- Franchising (indicate different locations)
- Separate mobile sites
- Quotation forms
What a subdomain is like
To better understand the concept of subdomain, we need to step back to learn how to read the domain name on a hierarchical scale.
In its full form, a domain name includes a top-level domain or TLD and a second-level domain or SLD.
The TLD is the part that is found immediately after the last point in the domain name, or what we usually call domain extensions, such as . com, . org, . net or . it, which is assigned to the DNS managing body.
The second-level domain – abbreviated SLD or 2LD – is the part that is immediately in front of the last point of the domain name, and that is what makes a domain name unique.
In the site.com example provided before, . com is the TLD and site is the second level domain.
Everything to the left of the 2LD and divided by a point represents a further subdomain, including the classic www. (which is therefore not an alias of the main domain, although by convention it is considered as such). It is for this reason that we can also choose not to use the www. for our site – and that Google can index a site with or without the www – and then replace this subdomain with any other term for a subdomain with a unique web address, without having to buy a new domain name – effectively creating a third-level domain.
Often a subdomain will be linked to the main domain with a navigation menu or internal links, but it may also be isolated, depending on the path set during the configuration of the site or a new section.
What a subdomain is for
Subdomains work as an extension of a registered domain name, allowing us to take visitors to a different web address or point to specific IP addresses or directories within a hosting account.
However, the most common use for a subdomain is to organize or divide the content of the site into separate sections: when a site has a significant amount of content on a given topic, or there is a topic we want to draw attention to or distinguish from the main one, even for marketing purposes, we can create a specific third-level domain, which will distinguish this section from the main site and host it in a unique web address, without the need to register a new domain name.
When to use a subdomain
There are technical, branding and SEO implications as to why as site owners we might choose to host content on a subdomain, reminds us of a recent article by Roger Montti.
At the development level, it may be preferable to host a staging version (copy of a website created by the developer to test a new web design model) of a website on a password-protected subdomain: This way, you can more easily configure a new database and install a new version of a site in that subdomain, replicating exactly the production site (the version of the site opened and visited by users).
The staging site hosted on a subdomain may have the same directory structure, Urls and permalinks as the main website active on the web; this subdivision allows the developer to easily use completely different layout models and technologies, without affecting the main site. For technical reasons, developers may find it easier to create a new database for a subdomain and treat that section as an independent website, keeping all database and CMS files completely separate from the rest of the main site.
This solution does not give SEO problems, because until the subdomain is linked anywhere on the Web, search engine crawlers generally will not find that subdomain; even if they find it, then, they won’t be able to scan the staging site because it’s password protected.
Using a subdomain can also have reasons in the work on branding and, for example, publishers can choose it to host support sections (support.site.com), where the user can find downloadable documentation, frequently asked questions and forums for questions and answers, keeping this section away from the rest of the main site. In practice, by choosing a subdomain we can create 2 different brands, which could also live a life of their own.
There may also be SEO reasons and strategies behind choosing a subdomain, especially if we have content topics completely different from those on the main site: with a subdomain, we can isolate that content while still remaining within the brand of the main site.
Given their characteristics, subdomains can be used to position contents with a different search intent or topics, or pertaining to a particular niche, of those of the central site. Each subdomain, in effect, behaves like a semantic universe that is close, but not identical, to the main domain, more or less close according to the site architecture.
This is the typical case of corporate blogs of e-Commerce sites, or news sites that host on a third-level domain a section of recipes, events or other topics not strictly related to current events.
In this sense, the subdomains are also useful for the segmentation of the audience, to intercept not only users interested in the main theme (for example, the sale of products), but also those who want to read informative content in the blog or news industry, which are different targets even if related to the subject. Doing so – and proceeding without errors – keep separate the keywords related to the main business from the more informative ones, intercepted by the blog or the specific subdomain.
When strategically planned, a subdomain is also clear and relevant, and can improve the user experience because it tells a user exactly what to expect when he clicks on that link and whether the content they are viewing is relevant to his intent.
What subfolders are
A subfolder – or subdirectory – is a lower hierarchy folder than the previous one, and at the site level we can consider subfolders all the directories inside the root of the site, the root folder from which all items branch out.
A subdirectory is therefore a part of the site structure associated with the domain name, usually separated from the slash symbol (/).
A common example of subfolder is site.com/blog: in this case, the blog/ subfolder is located within the main domain, is part of the main website like any other page and is, in effect, just another page of the site.
What subdirectories are like
In the old days of HTML coding, a web designer created folders and used to physically insert web pages into those folders; this is a process similar to the operation of file storage on a desktop computer, in which you create folders and insert images or spreadsheet files.
Everything that is inserted inside the main folder – which in the site is the root – is then called “subfolder” or “subdirectory”, indeed according to a hierarchy.
Each website is, in general, made up of different sections of categories and Web pages; just like desktop folders, online folders can also be organized with a secondary sorting, and for example in a subfolder called /green-widgets/ all HTML pages of green widgets should be inserted.
When the user navigates through those pages it literally moves through a folder and an HTML file (e.g., https://www.site.com/widgets/green-widgets/big-green-widget.html – with /widgets/ and /green-widgets/ folders that are also subfolders); in the classic WordPress system and on other PHP-based websites, these subdirectories are virtual – i.e., do not exist on the server and we cannot navigate to them with an FTP program and see the actual folders – but they are still part of the file structure of the website and are still called subdirectories.
Advantages of subdirectories
Adopting a content management approach through separation into folders is generally considered simpler and more immediate, because it basically does not move the natural accommodation of information within the site.
The directory structure, in fact, simplifies management, is less complex to maintain and also allows you to perform hosting migration operations without having to intervene on the DNS panel: it is a matter of working with a “single site”, with folders that create taxonomy and sort topics or intent specifically and visibly in Urls.
Moreover, a complete site (that is not subdivided into sub-domains) can be considered more authoritative than a site that focuses only on a granular part of a topic, because it can include a topic in the full width and depth and, therefore, attract more links and gain authority in the eyes of users and Google.
This is also linked to the ability to “concentrate” all the keywords within the main domain, which can be a great advantage in terms of marketing.
Differences between subdomains and subdirectories
Subdomains and subdirectories have some similar characteristics: both are content archives and file paths within the structure of a server’s “Home” directory – which in our cases is a URL.
A subfolder is a child directory (a hierarchical folder under another folder) that resides in a main directory (Home), and also a subdomain. And in both cases the user can access it just like a normal website address.
But much more numerous, and substantial, are the differences between these two systems, since a subdomain is not simply a path within a domain – like the subfolders – but a separate entity, as said.
A subdomain, in fact, is located outside the main domain and is hosted in its domain partition; on the contrary, the subdirectory always falls within the main domain, like any other page.
Reading a URL, we can always find the subdomain before and to the left of the main domain, while a subdirectory will always be after and to the right.
Subdomains and subfolders for the SEO and Google
It is important to think upfront on the choice between subfolder or subdomain, when organizing the structure of the site – we know how to significantly influence the performance of organic search – because the road we decide to take in the way we place content can have a practical impact on SEO.
As we wrote, Google’s algorithm treats subdomains as separate entities from the main domain – because some sites insert different content into subdomains that do not want to associate with the main site, or because those subdomains are controlled by different people – and indeed also in the Search Console subdomains are entered and registered as individual properties, as if they were different sites.
This means, to repeat and clarify, that for Google site.com/blog/ is part of site.com, while blog.site.com is a separate entity: and so, all content, but also all backlinks, of this sub-domain shall not be taken into account for the classification of the main domain.
Therefore, content (and its valuable resources, such as backlinks) hosted on a subdomain is not taken into account by Google’s algorithm when classifying the main domain.
It is almost as if the content published in the subdomain were hosted on a completely different domain for classification purposes; apparently this might not seem like a good thing, but sometimes it makes perfect sense, especially when subdomains should be seen as representing separate companies or divisions.
Anyway, for Google “one structure is the other” – already in this video, back in 2017, John Mueller said that for Google Search works both the use of subdomains and subdirectories – and therefore the choice must be considered considering the features of the brand, of business and the goals we intend to achieve.
Subfolder or subdirectory, which one is better for SEO
Apparently, then, there are no SEO advantages in choosing one structure or the other, even if the unitary solution (and therefore the subfolders) is preferred for convenience and practicality of management.
To clarify: there is no kind of penalty for who places the blog content in a subdomain, and the only risk that you run in this case is that the content published on the blog will not help the main domain to position itself better and earn more traffic. We must remember, in fact, that a subdomain does not have the same parameters as the main domain, and this also exposes to paradoxical situations, such as the case of a well-written article on a subdomain which, linked by an authoritative source, makes the secondary resource more important than the contents of the main domain.
This is confirmed by a famous (and now outdated) study by Moz, which highlighted how a structure with subdomains risks confusing the search engines and producing unwanted results, such as separating a large portion of keyword under the subdomain or diluting backlink strength.
If we are aware of this side effect – and the fact that the overall authoritativeness of subdomain and main domain is somewhat divided and potentially lower than that of a holistic structure using subdirectories – we will have no problems and difficulty in carrying on the project.
It is, ultimately, a scenario in which there is not really such thing as an ideal choice and everything “depends” on the specific cases: sometimes, it makes sense to host part of the site on a subdomain, in other cases the subdirectories can drive the growth of traffic. What matters is to understand the different usage scenarios and how they can affect the organic performance of the site.
Conclusions: when the subdomain is better and when the subfolder is
In some cases it can be easy to understand what is the best way, but in other situations and for particular types of content and functionality of the site you have to make broader considerations and try to evaluate the pros and cons of each option.
Sometimes, simply, there is no definitive answer as to how is best to proceed between subfolders or subdomains, but by studying a number of factors we can clarify our ideas and be able to make the choice that best suits our needs.
The consideration that should be a priority in deciding whether to use a subdomain is whether it works for users; then we can move on to understand how the decision can affect the SEO performance of the site, analyzing the potential technical, visibility and branding benefits of each of the paths.
In principle, if it makes sense for users that a section belongs to the rest of the site, using a subdirectory structure is the best way to structure a website; but if the section would be better off on its own, because it is very different from the rest of the site but we still want to continue to associate it with the brand or the name of the main site, then a subdomain might be the best approach.
Case examples on when to prefer subdomains or subdirectories
In most cases, a subdirectory is preferred on subdomains from the SEO point of view.
This is especially true for a blog or an e-commerce shop section, because hosting such content in a subdirectory can give an overall boost to the growth of the domain – provided that you avoid resource management errors, that can lead to the cannibalization of the keywords, frequent when the contents of the blog are positioned for keyword on which compete also the relative pages of the e-Commerce.
On some occasions, however, the use of a subdomain may still be the best choice, as in the case of foreign language variants of a main website, contents that are thematic very different from the rest of the site’s content, quotation forms, support centres or otherwise content that is unlikely to add value to the site in view of relevance or topicality. Moving these sections to a third-level domain does not harm the SEO (nor would the use of subdirectories bring benefits in this regard).
In short, as said, there is absolutely no better configuration than the other in reference to search engine optimization only: both the directory structure (site.com/blog) and that to subdomains (blog.site.com) are potentially suited to classifying content on Google – as long as they are of quality and meet all the basic requirements.
But we must not forget that often simplicity is the winner, and so it is preferable to choose the configuration that will be easier to maintain in the medium and long term – both for webmasters and web hosting, which sometimes support one mode rather than the other.