Guide

Choosing Right: Subdirectory or Subdomain for Enhanced SEO

Written by
Written by
Reviewed
Reviewed by
Choosing Right: Subdirectory or Subdomain for Enhanced SEO

Which is better for optimizing your multilingual website for search engine traffic: subdirectories or subdomains?

Despite the similarity in their names, these two website structures work differently. They naturally also have different implications for search engine optimization (SEO). Choosing the right structure can potentially help your main website rank higher on the search engine results pages (SERPs) which is an important consideration when it comes to meeting your SEO goals.

And apart from SEO considerations, other situations might call for using one website structure over the other.

With all these in mind, let’s take a deeper dive into what subdirectories and subdomains are, their pros and cons, when you should use each website structure, and how such a decision can affect your search engine rankings.

What are Website Subdirectories and Subdomains?

Website structures fall under the branch of technical SEO, which involves enhancing a website’s technical setup for higher search rankings. The word “technical” tends to scare people off, but we’ll keep our explanations on subdirectories and subdomains simple!

Subdirectories

Subdirectories are content subfolders that help subdivide sections of your primary website. Each subdirectory shares your website’s top-level domain (TLD), and its URL structure always comes after the root domain. The following are all examples of subdirectories:

  • example.com/shop
  • example.com/shop/shoes
  • example.com/shop/shoes/accessories

In our example, you’ll see that we have a URL for the main page for an online shop and a subdirectory in this shop page for a section on shoes. And within the shoe subdirectory, we have another subdirectory for shoe accessories.

Breaking down a URL: illustrating what subdirectories are

With such a hierarchy, subdirectories are typically used to organize content on a single website. If you’ve ever looked at the file paths for files, folders, and subfolders stored on your computer – such as “My Stuff\Travel Photos\Italy 2019\Colosseum.jpg” and “My Stuff\Finances\Credit Card Bills\2021” – you’ll find them to be pretty similar to the URL structures for website subdirectories!

There is also no limit on the number of subdirectory levels, so you could technically keep dividing your subdirectories into further subdirectories forever. (We wouldn’t advise on doing so, though. We’ll share more about why later.)

Subdomains

Subdomains, in contrast to subdirectories, are sections of a website that have their own unique domain name. Examples of subdomain URL structures can be viewed on the "weglot.com" website:

  • https://support.weglot.com/
  • https://academy.weglot.com/
  • https://roadmap.weglot.com/

As you can see, unlike subdirectories that exist after the root domain, subdomains carry their "main name" before the root domain. Each subdomain, while part of the website as a whole, is treated as a separate entity under your primary domain. It's essential to note that the creation of subdomains from existing subdomains is not an option, resulting in a flatter hierarchy than subdirectory structures.

In scenarios demanding segregation of website content into different entities, such as designated support pages or blog sections, utilization of subdomains is recommended. Remember, however, while you cannot create subdomains of subdomains, you can still have subdirectories within a subdomain, such as:

A subdomain and a subdirectory in one URL.

When Should You Use a Subdirectory or Subdomain in the Context of Multilingual Sites?

While subdirectories and subdomains both help you organize the contents of your global website, their characteristics make them more useful in certain situations over the other. Here, we’ll examine their pros and cons and when it might make more sense to use a subdirectory structure over a subdomain one (and vice versa).

Subdirectories

Pros of Subdirectories

For SEO purposes, search engines treat subdirectories as part of your main domain. This means that the Domain Authority and Page Authority of your subdirectory pages are closely tied to those of your root domain and vice versa.

(Quick recap: “Domain Authority” and “Page Authority” are scores developed by the Moz SEO tool to determine how high a website, or certain web pages of a website, are respectively likely to rank on the SERPs. A higher score indicates a higher website or web page authority, and hence a higher likelihood of the website or web page ranking well.)

If your root domain has a high Domain Authority, then your subdirectory pages will inherit this high Domain Authority as well. As a result, when you publish a piece of content to a subdirectory page on a root domain with a high Domain Authority, it may enjoy higher SEO rankings than if you were to publish the same content to a subdomain with a lower Domain Authority.

In addition, subdirectories can make your website easier to navigate if used correctly. They can give your URLs a clear hierarchy that helps users understand what they’re clicking on and the relationships between your web pages.

How subdirectories indicate hierarchy.

For example, we may have these two URLs that lead to the same web page:

  1. example.com/ad92q4lakdmczp
  2. example.com/blog/hello-world

Which URL looks more appealing to click? It’s the second one, definitely – because you can actually understand what the URL is saying. Meanwhile, the first URL just looks like a bunch of gibberish.

At the same time, as you read the second URL, you can guess that it’s for a blog post in the website’s blog section, where the blog post is titled “Hello world.” But from just looking at the first URL alone, it’d be impossible to guess what the web page is about.

Cons of Subdirectories

While subdirectories are helpful for categorizing web pages, it’s important not to go overboard with subdirectory creation. That’s because having too many layers of subdirectories just makes your URLs very long and confusing. Take a look at this hypothetical URL, which seems to go on for forever:

“https://example.com/website/blog/dailylife/pets/cats/british-shorthairs/2022/january/14/friday/taking-my-cat-to-the-vet/…”

Such long URLs can create a poor user experience as users might get intimidated by their length and avoid clicking them (if you’ve also used them as your links’ anchor text). Users may also be deterred from sharing your URLs with others, especially if they need to type the URL manually.

Hence, even if you have a website that requires using complex hierarchies of subdirectories, try to flatten these hierarchies as much as possible. For example, consider simplifying your website categories and subcategories to include only those that are truly essential. You may also consider using subdomains instead (more on this later).

Subdirectory Use Cases

Subdirectories are perfect for content-rich websites where the content you publish is relevant to the purpose of the main site. For example, you may have launched a website to promote your product and want your website to rank as high as it can in the SERPs. As part of your content marketing and SEO strategy, you decide to publish blog posts that will rank for keywords related to your product, in the hope that searchers who land on your blog posts will check your product out in more detail.

In this case, you’ll want your blog content to be considered part of your main website that features your product. That’s because the authority that your blog posts accrue will influence that of your main website, and help it rank higher on the SERPs as a whole.

Free download: How to grow your international SEO performance in four steps

For this reason, you can see that the Weglot blog URL is structured as “weglot.com/blog” instead of “blog.weglot.com”!

Another use case for subdirectories would be where you want to categorize different website sections. We can use the Nike website as a case study here: when you visit it, you’ll see that the company has separate subdirectories for web pages meant for users from different countries, such as:

  • https://www.nike.com/au/ (for its Australia website)
  • https://www.nike.com/gb/ (for its United Kingdom website)
  • https://www.nike.com/ca/ (for its Canada website)
Nike Australia homepage
Nike’s Australian website
Nike UK homepage
Nike’s British website
Nike Canada homepage
Nike’s Canadian website

Subdomains

Pros of Subdomains

The distinct benefit of using subdomains lies in the possibility of creating segregated independent branches for different campaigns, geographic variants, or specific sectors of your business. For instance, if you are operating an online store in France, New Zealand, and Spain, you might have these subdomains for each operational country:

  • fr.store.com (for your store operations in France)
  • nz.store.com (for your store operations in New Zealand)
  • es.store.com (for your store operations in Spain)

Such regional subdomains make it explicitly clear to the users, informing them that they are visiting a region-specific variant of your online store.

Cons of Subdomains

With subdomains being treated as separate websites from your main website, they don’t have any influence on the authority of your root domain (and vice versa). Hence, even if you have a subdomain that is ranking extremely well in the SERPs, it will have little to no impact on your main website’s search rankings.

Subdomain Use Cases

As mentioned, you can use subdomains to create different regional versions of your website. These subdomains won’t share your main website’s Domain Authority or Page Authority. However, this situation can actually be beneficial if your website variants cater to entirely different audiences and target different keywords, and you don’t want the rankings of one website to affect those of another.

If you go to the Wikipedia website, for example, you’ll see that it has subdomains such as the following for the regional versions of its online encyclopedia:

  • https://en.wikipedia.org/ (for the main English version of Wikipedia)
  • https://pt.wikipedia.org/ (for the Portuguese version of Wikipedia)
  • https://de.wikipedia.org/ (for the Dutch version of Wikipedia)

Even if you don’t have region-specific versions of your website, you may want to use subdomains to spread content across multiple websites and have such content treated as separate websites for SEO purposes. For instance, the HubSpot website (https://www.hubspot.com/) has subdomains such as:

  • https://blog.hubspot.com/ (for its blog)
  • https://ecosystem.hubspot.com/marketplace/website (for its website theme marketplace)
  • https://developers.hubspot.com/ (for its developer resources)
Screenshots of the different HubSpot pages

Similarly, if you are running digital marketing campaigns that need separate branding and landing pages, it might make sense to park them under different subdomains instead of your main domain.

Just take it from toy manufacturer Lego. Apart from its main “lego.com” domain, it also has an “https://ideas.lego.com/” subdomain where users can submit ideas for new Lego products under a Lego Ideas campaign.

Finally, it may make sense to use subdomains out of sheer technical necessity. This could be where:

  1. You run a section of your website, such as a blog, on a certain content management system (CMS) but host your main website on a server that does not support that CMS. In this case, you might need to host your blog on a separate server – and with a subdomain.
  2. You’re using third-party software to run the features of your other website, and the software provider has no access to your main website (and hence its subdirectories).

For an example of the second situation, take a look at the Flodesk website. This email platform has its main domain at “https://flodesk.com/” and uses third-party help desk software for its knowledge base. You’ll see that the URL structure for its knowledge base is hence “https://help.flodesk.com/” instead of, say, “https://flodesk.com/help”.

Subdirectory vs Subdomain: Which is Better for SEO?

When deciding between subdirectories and subdomains for your website's organization, it's important to consider SEO. Does one website structure inherently have an advantage over the other when search engines decide how to rank web pages?

The answer is no. In this video, Search Advocate for the Google search engine, John Mueller, shares that Google’s algorithms don’t prefer subdomains over subdirectories (or vice versa) when ranking pages:

In particular, he says:

“Google Web Search is fine with using either subdomains or subdirectories […] [Setting up parts of a website as subdirectories is] fine for us. This helps us with crawling since we understand that everything’s on the same server and can crawl it in a similar way. […]

[Putting website sections in separate subdomains] also works for us. […] We do have to learn to crawl them separately, but for the most part, that’s just a formality for the first few days.

So in short, use what works best for your setup and think about your longer-term plans when picking one or the other.”

Your choice of subdirectories or subdomains doesn't directly impact your website's ranking. However, if your goal is to enhance the ranking of your main website, using a subdirectory structure can definitely be beneficial. This is because content in subdirectories shares the authority of your main website, while content located in a subdomain does not. 

Furthermore, subdirectories can boost your root domain's Domain Authority over time through the acquisition of backlinks. If you use a subdirectory structure for your website, any backlinks that web pages in your subdirectories pick up will boost these pages’ authority. This can, in turn, boost the Domain Authority of your root domain over time.

On the other hand, if you’re producing content on entirely different subjects and want search engines to rank such content separately, a subdomain structure might be more appropriate as search engines will treat your subdomain content as being part of a separate website.

However, be aware that if your subdomains target the same keywords as your main website (or vice versa), your website content might end up competing against each other on the SERPs! To prevent this from happening, optimize your subdomains for different keyword searches from each other.

 For example, consider translating your keywords if your subdomains contain different language versions of your main website’s pages. For more guidance, check out our video demonstrating how to do this in 4 easy steps:

Balancing Subdirectories and Subdomains for Your Website

Subdomains can be utilized to create distinct, unique sites for variegated campaigns, regional variants, and other branches of your enterprise. For an online business that operates in diverse countries, this approach can produce remarkable results. 

In contrast, subdirectories are particularly beneficial for websites where the published content is relevant to the domain. If you launch a website to promote a product and decide to publish blog posts that target keywords associated with your product, then using subdirectories for such materials would be advantageous. This is because your blog posts will share the authority of your primary website, contributing to a higher rank in the SERPs in general.

So, are Subdirectories or Subdomains Better for Optimizing Your Website for Search Engine Traffic?

Here’s the overall takeaway from the issue of whether subdirectories or subdomains are better for SEO. And, as Mueller echoes, you may not be surprised to learn that it all depends on what’s best for your business:

  • If you intend for all your website content to be associated with your primary domain and ranked accordingly, then use subdirectories. Search engines will consider your subdirectory content to be part of your main website, and use the accrued authority of these pages to determine your main website’s rankings (and vice versa). Just try not to create too many subdirectories within subdirectories, as this can cause your URLs to become long and unwieldy.
  • If you want to split your website content up based on business entities or language variants, then use subdomains. With search engines considering separate subdomains as separate entities, one subdomain’s website authority will have little impact on that of another subdomain or your main website. This helps you make more targeted SEO decisions for each of your website properties, such as optimizing your subdomains for different keywords or translating your subdomain content into your target audiences’ native languages.

Subdomain vs Subdirectory: Choose Wisely

Both subdirectories and subdomains are useful for organizing website content, but your choice should align with your business needs. 

Subdirectories, located under your root domain, establish content hierarchies and inherit your root domain's Domain Authority. This can influence your main website's authority and vice versa, making them ideal for boosting organic traffic.

In contrast, subdomains have their own domain name and are considered separate websites from your main domain. Consequently, content authority on a subdomain has minimal impact on your main website's rankings or other subdomains. Among other reasons, website owners generally use subdomains to create website sections that are related to but separate from their main website, such as a subdomain for their support center or their blog.

Subdirectories and subdomains are also commonly used to carve out sections for different language versions of a website. Some webmasters prefer to use subdirectories for such multilingual pages, while others prefer to create new subdomains. If you’re in the same position and are wondering what the “right” way of doing things is, there isn’t one! It all depends on your SEO strategy and the approach that you think works best for your business.

Whether you decide to use a subdirectory or subdomain structure for the different language versions of your web pages, Weglot is perfect for helping you build a successful multilingual website and optimizing it for search engine traffic.

Weglot’s website translation solution uses a proprietary mix of machine learning languages to translate website content into over 110 languages with a high degree of accuracy. After that, it automatically creates separate language subdirectories or subdomains to house each set of translated content. No fiddling around in your website backend needed, as Weglot takes care of such technical setup for you!

Used by more than 70,000 websites, Weglot also includes other features that you’ll find useful for running a multilingual website. These include:

  • Automatic hreflang tag implementation to help search engines identify the appropriate language versions of your web pages to serve to international searchers.
  • Media translation so you can display localized images, videos, and other media to website visitors.
  • Team collaboration for inviting team members and external partners to your translation project as you get your website translations ready for use.

Weglot is compatible with all leading website and ecommerce platforms, including WordPress, Shopify, and Webflow. Sign up for an account here to try Weglot on your website for free.

In this guide, we're going to look into:

Explore more about working with Weglot

Try for free