Skip to content

Subdirectory or Subdomain?

By Matthew Edgar · Last Updated: January 20, 2023

If you have a new section of content to add to your website, should you add that new section: sub-domain or sub-directory? Is there a difference between subdomains and subdirectories when it comes to SEO performance?

Quick Recap

Subdomains:

  • Example: example.mysite.com
  • A subdomain is a domain that is a subset of your website’s main domain.
  • Subdomains are evaluated as a separate website, so any positive ranking signals connected with the main website may not transfer over to the subdomain.
  • Subdomains might make sense for content that is more distinct from the main domain, like support content or content that targets a specific audience.
  • If some type of content on your website is considerably different in terms of quality, keeping that content on a subdomain might make sense.

Subdirectories:

  • Example: mysite.com/example
  • A subdirectory (or subfolder) is part of your main domain.
  • Subdirectories are evaluated as part of the same website, so any positive ranking signals referencing subdirectories also benefit the main domain.
  • Subdirectories might make sense for content that is connected to the content on a main website, like a blog or products page.
  • Visitors may likely not notice if the URL changes to include a subdirectory, but may be confused or frustrated if a subdirectory is designed differently than the main website.

What is Subdomain? What is Subdirectory?

Before diving into which method is best, let’s quickly define what each is:

  • A subdirectory (or subfolder) is part of your main domain. In the case of this website, the main domain is matthewedgar.net. A sub-directory for my blog may look like matthewedgar.net/blog, where “blog” is the name of the subdirectory.
  • A subdomain is a domain that is part of your website’s primary domain but is distinct and separate. For instance, I could add a subdomain for photos at the URL photos.matthewedgar.net. This distinguishes the “photos” domain as something separate but still connected to the main domain.

You can think of a subdomain as almost a separate website, where a subdirectory is part of the same website.

Diagram showing subdomain vs subfolder.

Is a subdomain better than a subdirectory?

Short answer: no. Subdomains and subdirectories both have their place and purpose. Both can rank in search results. Both can drive conversions. Both work technically. However, in some situations, a subdomain is more appropriate than a subdirectory, and in other situations, a subdirectory is a more appropriate solution. There are three main ways of evaluating whether a subdomain or subdirectory is better for your website: SEO considerations, UX considerations, and technical considerations.

SEO Considerations

As search engines evaluate a website’s content, their algorithms will usually view content contained on a subdomain as separate and distinct from the main website. In the example graphic shown above, content contained on MyMainWebsite.com would be evaluated separately from content contained on Sub.MyMainWebsite.com.

This means the subdomain and main domain are treated as separate websites when it comes to determining where the content on the main domain or subdomain ought to rank. Because a subdomain is evaluated as a separate website, any positive ranking signals connected with the main website may not transfer over to the subdomain.

For example, if a subdomain has many high-quality backlinks, that will likely help the subdomain rank higher in search results but those high-quality backlinks will not do as much to help the main domain earn higher rankings. The reverse is also true. If the main domain has many high-quality backlinks, those could help all of the pages contained on the main domain earn rankings but would not help any pages on the subdomain earn rankings.

It might seem, then, that the best answer for SEO is to host all content on the main domain to help improve rankings for all content. However, some content deserves to be separate. For example, a blog is often connected to the content on a main website, so a company’s blog should be located in a subfolder, such as site.com/blog so that any positive ranking signals referencing blog posts also benefit the main domain. However, content that is more distinct from the main domain, like support content or content that targets a specific audience, might make more sense to host on a subdomain.

Related to that, Google’s Helpful Content Update in 2022 highlights another reason you may want to keep certain content separated on a subdomain. In response to this update, Google’s Danny Sullivan noted that “We tend to see subdomains apart from root domains but it can also depend on many factors.” While subdomains should not be used as a way to hide unhelpful content, it is likely that unhelpful content on a subdomain would not impact the content on the main domain. If some type of content on your website is considerably different in terms of quality, keeping that content on a subdomain might make sense. For example, it might be best to keep user-generated content contributed within a forum, which might not be as helpful, on a subdomain so that this content is separated from the content you’ve written on your main website.

UX Considerations

Next, you need to consider how the people visiting your website want to engage with different sections of content on your website. Users may likely not notice if the URL changes to include a subdomain but users will notice if a subdomain is designed differently than the main website. The more the design of a subdomain differs from the design of the main website, it is important to ask how your visitors would respond to this.

Would your visitors consider a certain section of content to be part of your website or separate from your website? If visitors would consider a section of content to be a part of your website, then hosting that content on a subdomain with a unique design might lead to confusion and frustration. If however, visitors would consider a certain section of content to be separate from your website, then hosting that content on a subdomain with a unique design could be beneficial.

This requires understanding the main sections of content on your website and how visitors engage with each section of content. For example, a SaaS company likely will have support content related to their software. The support content, however, is only intended for a subset of the company’s audience: active users and paying customers. The rest of the company’s audience, like prospective customers, would likely not be interested in viewing support-related information. In fact, prospective customers might find support content confusing if it is intermixed with sales-related content. Given this, it might make sense for this company to place the support-related content on a subdomain with a unique design so that it is clearly separated from the content contained on the main domain.

Technical Considerations

Finally, it is important to consider the technical structure of your website. While technical limitations shouldn’t overrule what is best for your users or what is best for SEO, the reality is technical limitations exist and sometimes change how you need to set up your website.

In some cases, subdirectories are easier to create technology, especially if you are working with different platforms. For example, your e-commerce platform might be built using one technology and you’ll need to build your blog using a different technology. These two technologies might have incompatible hosting requirements, requiring either the blog or the shopping section of your website must be hosted on a subdomain (it may be possible to set up a reverse proxy instead, though this isn’t always an option). If you are forced into using a subdomain for some of your content due to technical reasons, you’ll need to ensure that those subdomains are still able to get the necessary traffic and satisfy your users.

Need Help?

If you need help deciding whether to use subdomains or subdirectories on your website, contact me for help deciding what solution is most appropriate given your specific situation.

You may also like

Breadcrumbs & Breadcrumb Schema

Do you need to use breadcrumb navigation on your website? If you do, should you mark it up with breadcrumb schema? In this article, we’ll discuss the best ways to approach those questions.

How To Fix 404 Errors On Your Website

How do you find the 404 errors on your website? Once found, how do you fix the 404 errors? What tools can help? Find out in this in-depth 404 guide!

Noindex vs. Nofollow vs. Disallow

Are you confused about the difference between noindex, nofollow and disallow commands? All three are powerful tools to use to improve a website’s organic search performance, but each has unique situations where they are appropriate to apply.