Google more or less assigns subdomains to subdirectories (also known as subfolders).

One major difference, however, is that subdomains are viewed as separate sites and are different from the main domain.

It is important to consider the practical implications for your SEO before placing any content in a subdomain or subdirectory.

The difference between a subdomain and a subdirectory

What is a subdirectory?

A website is usually 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 in those folders.

For this reason, they are called "sub-folders" or "sub-directories".

This is similar to how file storage works on a desktop computer, where you create folders and insert pictures or spreadsheet files into the folders.

Just like your desktop folders, the online folders have a name like / green-widgets /. All HTML pages of the green widget would be stored there.


Read on below

When you navigate to these pages, you are literally navigating to a folder and an actual HTML file:

These / widgets / and / green-widgets / folders are called subdirectories or subfolders.

In typical WordPress and other PHP-based websites, these 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.

Although they are virtual, they are still part of the website's file structure and are still referred to as subdirectories.

A subdirectory is part of the structure of the website that is associated with the domain name.

What is a subdomain?

A subdomain is very different from a subdirectory. It's like a completely different website.

The subdomain is assigned to the domain, but not the website assigned to the domain name.

A subdomain is generally considered to be a stand-alone site that branches off from the main domain.

This is an example of a subdomain:


Read on below

This is an example of a subdomain that contains a subdirectory:

Google views subdomains as separate, stand-alone websites

Google has always treated subdomains as different websites separate from the main domain.

This shows up in the Google Search Console, where subdomains need to be checked separately from the content on the main domain website.

Google's John Mueller explained this in a webmaster video:

"You need to review subdomains separately in the search console, make changes to the settings, and track overall performance per subdomain.

We'll have to learn how to crawl them separately, but for the most part this is just a formality for the first few days. "

When is a subdomain used?

There are technical, branding, and SEO implications as to why a publisher would host content on a subdomain.

Technical reasons for using a subdomain

A web developer can 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 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 this subdomain that exactly replicates the production site (the version of the site visitors are visiting).

As long as the subdomain is not linked from anywhere on the web, search engine crawlers generally cannot find this subdomain. In this case, they will not be able to crawl the staging site because it is password protected.

Technically, the staging site hosted on a subdomain can have the same directory, URL, and permalink structure as the main website that is on the web.

Hosting a staging site in a subdirectory is more difficult and errors in the link structure can creep in.

For technical reasons, developers may find it easier to create a new database for a subdomain and treat this section like an independent website, with all database and CMS files completely separate from the rest of the main website.


Read on below

By dividing a site into a subdomain, the developer can easily use 100% different layout templates and technologies without affecting the main website.

Branding Reasons for Using a Subdomain

Branding is another reason to use a subdomain.

For example, publishers often choose to host their support areas in a subdomain.

There a user can find downloadable documentation, FAQs, and Q&A forums under a subdomain such as

Screenshot example of the use of a subdomain versus a subdirectoryScreenshot of a subdomain with which a support area is branded

For branding purposes, some companies may choose to create a separate subdomain to divide and brand a section of their website like the support pages and keep it away from the rest of the main website.


Read on below

SEO Reasons for Using Subdomains

There may also be SEO reasons for hosting in a subdomain. For example, if a publisher has a content theme that is completely different from this main website.

The publisher can host this section on a subdomain to isolate this content on its own website but still be on the main website brand.

For example, some news sites host their recipe content on a subdomain.

I don't know if this is for SEO reasons, but it's an example of how a section of a website that has a completely different theme is separated from the rest of the website, with one section being static and relatively evergreen and the rest the website The website is constantly changing.

Screenshot of a news page hosting recipe content in a subdomainScreenshot of a news site hosting recipe content in a subdomain

By separating the recipe section from the rest of the site, a publisher can control what this entire section is about (recipes), rather than allowing the rest of the site to influence or overwhelm that one section.


Read on below

Whether Google can rank a subdomain area better when it's isolated is a matter of opinion.

However, this is done for SEO reasons so that a subdomain can rank independently without the influence of the main page and vice versa.

Below is the SERP ad for the Recipe Subdomain section of the New York Times.

If you search for "Recipes NYTimes", Google will display this in the SERPs like a stand-alone website with a six-pack list of subsections.

Screenshot of a subdomain that is treated by Google as an independent websiteScreenshot of the New York Times Cooking subdomain in the Google SERPs

Subdirectory layouts are useful

A comprehensive site can be considered more authoritative than a site that focuses only on a specific part of a topic.


Read on below

This does not mean that the granular site is less authoritative or useful.

However, a site that can span the full breadth and depth of the subject may attract more links and be recognized as authoritative.

Because of this, a site can use subfolders instead of a subdomain approach.

Another reason to use a subdirectory layout is because different sections overlap.

Someone shopping for cereal online may want to bring gym shorts to work from home.

A site that includes both elements is more useful than a site that focuses only on one or the other.

Subdirectory or subdomain? Choose what works best

The most important consideration for using a subdomain is whether it will work for users.

Even so, the SEO, branding, and technical benefits of each must be considered.

In general, when it makes sense for users to have a section belonging to the rest of the site, using a subtree is the best way to organize a website.


Read on below

However, if the section is better as a standalone site because it is so different from the rest of the site and you want that section to continue to be associated with the branding or name of the main website, a subdomain might be the better approach for you.

Sometimes there just isn't a definitive answer to which way is best. However, taking all these factors into account, the choice becomes easier.

More resources:


All screenshots by the author, December 2020


Please enter your comment!
Please enter your name here