Skip to content

Subdirectory or Subdomain?

By Matthew Edgar · Last Updated: December 15, 2023

If you have a new section of content to add to your website, should you add that new section: subdomain or subdirectory? 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 subset of your website’s main domain.
  • Subdomains are typically 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 product pages.
  • 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 subdirectory 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.

It is also important to keep in mind Google’s Helpful Content Updates (HCU) as you consider subdomain usage. When HCU first rolled out in 2022, Google’s Danny Sullivan noted “We tend to see subdomains apart from root domains but it can also depend on many factors.” That is in line with how Google has historically treated subdomains. Unfortunately, many people took this to mean they could hide unhelpful content on a subdomain.

Google updated its stance on how content on subdomains is evaluated in 2023’s HCU. With this update, Google’s documents now say, “If you host third-party content on your main site or in your subdomains, understand that such content may be included in site-wide signals we generate, such as the helpfulness of content.” In other words, if there is low-quality (unhelpful) content on a subdomain, Google may consider everything on your domain to be unhelpful. Not only with the low-quality content prevent the subdomain from ranking, now it can also prevent your main website’s content from ranking.

Ideally, though, you weren’t using a subdomain to hide low-quality, unhelpful content on your website. Regardless of where the low-quality content exists, on a subdomain or otherwise, it should be removed from your 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, subdomains are easier to handle different technologies when 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.

Subdomains vs. Subfolders for International & Multilingual Websites

The subdomain vs subfolder question also comes up for international and multilingual websites. While many of the same considerations discussed above are also applicable to international websites, there is a third option to consider: country-specific domains, or ccTLD.

Google will support international websites using a subdomain, subfolder, or a ccTLD. A ccTLD tends to be a clearer way of indicating you are targeting a separate country entirely. It is a completely separate domain, so Google will treat it as a completely different website. A subdomain, meanwhile, is most often used for presenting the website in a different language. A subdomain targets a similar, but distinct, audience from the main website. Subfolders can be problematic because they do not always create a clear enough separation between audiences in different countries or speaking different languages.

That said, you can find examples of companies successfully using all three options.

  • Amazon uses a country-specific domain. The US website is amazon.com, Canada’s website is amazon.ca and the UK website is amazon.co.uk.
  • United Airlines uses subfolders. The US website is located at https://www.united.com/en/us, while the UK website is located at https://www.united.com/en/gb.
  • AirBNB uses a mixture of ccTLD and subdomains. For example, AirBNB’s UK website is located at https://www.airbnb.co.uk/. However, the Spanish version of the US website is available at https://es.airbnb.com/.

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

Google Search Console: Page Indexing Report

Is Google indexing every page on your website? If not, why not? To answer these questions, you need to use the Page Indexing Report in Google Search Console. Find out how to use and understand this report.

How to Check HTTP Response Status Codes

Every page on every website returns an HTTP response status code. How do you check the status code for your website’s pages? What tools can you use to test status codes? What do the status codes mean?

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!