Trying to decide between a subdirectory vs subdomain for your multilingual website (or a single language site)?
Choosing between a subdirectory and a subdomain can be a tough decision. Both approaches have their pros and cons, and it ultimately comes down to what works best for your website and its specific needs.
So – which one should you use?
Well, there are pros and cons to using both subdirectories and subdomains, which is kind of the point of this post.
Below, you’ll learn the advantages and disadvantages of both approaches so that you can pick the one that’s right for your website.
We’re going to come at this from the perspective of creating a multilingual site – e.g. yoursite.com/es/hello
vs es.yoursite.com/hello
for the Spanish version of your site. However, the same principles would hold true to monolingual use cases as well – e.g. blog.yoursite.com
vs yoursite.com/blog
.
We’ll start with a quick introduction to what these two terms mean and then we’ll dig into the more actionable details to help you decide, including the pros and cons of subdomain vs subdirectory.
Subdirectory vs Subdomain: Basic Introductions
To start, let’s take a basic look at what subdirectories and subdomains are.
If you already know the definition of these terms, you can click this jump link to skip ahead to the next section where we compare the pros and cons of a subdirectory vs a subdomain.
Otherwise, let’s start at the very beginning.
What Is a Subdirectory (Subfolder)?
A subdirectory, also known as a subfolder, is a folder that’s part of your main domain name. In layman’s terms, it comes somewhere after the slash “/
” that appears after your domain’s extension – e.g. “.com
“.
For example, let’s say your main website is in English and you also offer a Spanish version.
The main website could be yoursite.com
. Then, you could create a subfolder for the Spanish version at yoursite.com/es
.
For example, the English version of a blog post would be at yoursite.com/hello-world
and the Spanish version could be at yoursite.com/es/hello-world
.
The important thing to understand is that a subdirectory is still part of your main domain name. It’s just a different section of the main domain name.
What Is a Subdomain?
A subdomain is a subdivision of your main domain name that lets you create a new domain name under the umbrella of your main domain name.
For example, if your main domain name is yoursite.com
, you might create a separate subdomain for your Spanish-language site at es.yoursite.com
.
The English version of a blog post would be at yoursite.com/hello-world
and the Spanish version could be at es.yoursite.com/hello-world
.
While a subdomain retains some association with the main domain name, it’s technically its own separate domain name.
This is one of the most important distinctions to understand between a subfolder vs subdomain – the subfolder is still part of the main domain name while a subdomain is technically a separate domain name.
The fact that a subdomain is separate from the main domain name has both pros and cons, as we’ll discuss next.
Pros and Cons of Using Subdirectories And/Or Subdomains
Now that you know what subdirectories and subdomains are, let’s take a look at some of the pros and cons of subdomains and subdirectories.
Pros of Using Subdirectories
- Your subdirectories benefit from the full authority of your main domain name, which can make it easier to rank subdirectory content in Google. The subdirectory vs subdomain SEO differences are one of the biggest reasons to consider the subdirectory structure for your multilingual website (or for any other type of website).
- There’s no special technical setup like subdomains require. You can set up subdirectories from whatever content management system you’re using (e.g. WordPress) and you don’t need to make any changes in your hosting dashboard. For example, the TranslatePress plugin can automatically create a subdirectory for each language on your multilingual WordPress website.
Cons of Using Subdirectories
- Not as much technical flexibility. For example, you can’t host a subdirectory on a different server and it’s a little more complex if you want to install different software in the subdirectory. While these cons won’t affect most sites, they could be an issue for certain use cases.
Pros of Using Subdomains
- You can use separate hosting. This would let you use a local hosting server for each region, though this adds a lot of complexity. A simpler option would be to just use subfolders and add a content delivery network (CDN), which ensures that visitors from different regions can download your site’s files from a server location that’s close to them.
- It’s easier to install separate software. While this isn’t likely to help multilingual websites, it can be helpful in certain situations – such as using WordPress for blogging functionality and Shopify for eCommerce functionality.
Cons of Using Subdomains
- Google generally treats subdomains as separate entities, which means that your subdomains might not benefit from the full authority of your root domain. How much of an effect this has is debated by SEOs, but most people agree that there is at least some effect.
- It’s a little more technical to set up subdomains. Many hosts give you tools to create and manage subdomains, especially if your host uses cPanel. However, it’s still some added complexity vs just using a subdirectory.
Other Domain Structures for Multilingual Sites
We apologize for making your choice between a subdomain vs subdirectory a little more complicated, but we’d be remiss if we didn’t mention that there are some other potential domain structures for creating a multilingual website:
- Separate domain names – this can have some advantages, but it adds a lot of complexity (and cost).
- URL parameters – we (and Google) don’t recommend using this structure but we will briefly explain it because you will still see some sites use this approach.
Using Separate Domain Names Instead of Subdomains or Subdirectories
Another approach that you’ll see on some multilingual websites is separate country-specific domain names for each website.
For example, Amazon uses a number of country-specific domain names for various sites:
- USA – amazon.com
- Germany – amazon.de
- UK – amazon.co.uk
- Japan – amazon.co.jp
- Etc.
One big advantage of this approach is that it makes it very clear that each domain name is localized for that area. It also makes it easy to build separate brands on each domain name, especially if you use a solution such as WordPress multisite.
However, this approach adds a lot of complexity and cost, which is why you’ll typically only see it used by very large brands that can invest the time and resources into setting it up.
For most “regular” multilingual websites, the benefits are not worth the added complexity and cost and a simpler alternative like subfolders offers a better solution.
Using URL Parameters Instead of Subdomains or Subdirectories
URL parameters are bits of code that appear after a question mark in your domain name. For example, a site might use a ?lang=
URL parameter to adjust the language:
- The English language version of a blog post might be at
yoursite.com/hello-world?lang=en
- The Spanish language version of the post might be at
yoursite.com/hello-world?lang=es
We do not recommend using this approach because there are no real advantages and it has some very big disadvantages.
Most notably, you can’t segment your site based on the URL structure, which makes it hard for Google to crawl and understand your site.
It’s also confusing for your human visitors because they can’t recognize geotargeting from the URL alone and they probably won’t understand how URL parameters work.
Beyond our own recommendations, Google also specifically recommends against using URL parameters in its documentation on creating multi-regional sites.
How to Choose Between Subdomains vs Subdirectories for Your Multilingual Website
While there’s no hard rule that applies to all situations, most multilingual sites will be better off using subdirectories.
There are a few reasons why we say this:
- The multilingual versions of your site will benefit from the full authority of your main domain name, which will help them rank higher in search engines like Google.
- There’s zero added technical setup and you don’t need to do anything extra in your hosting dashboard.
- You can still fully localize your content, such as using different URL slugs for different languages. For example,
yoursite.com/hello-world
andyoursite.com/es/hola-mundo
. - Each language version of your site is still contained within its own subfolder, which makes it easy for Google and human visitors to navigate your multilingual sites.
On the other hand, subdomains could work better for certain niche situations. While they do add complexity in setting things up, the upshot is that you also get more flexibility in the technical configuration.
For example, you could use different localized servers to host different regional versions of your site, which wouldn’t be possible with a subfolder.
But again, you can achieve similar localized performance with subfolders by using a content delivery network (CDN), so the advantages of the subdomain approach are limited.
Additionally, it’s important to remember that your subdomains might not benefit from the full authority of your main domain name, which could hamper your international SEO strategy.
Create Your Multilingual Website Today
Now that you know how to choose between a subfolder vs subdomain for your site, you’re ready to dig in and launch your multilingual website.
If you’re using WordPress, the free TranslatePress plugin offers an easy, code-free way to create a multilingual website using subdirectories.
You can translate your content automatically or manually according to your preferences. Either way, you can also manage everything from TranslatePress’ visual translation editor.
Then, TranslatePress will automatically create subfolders for each language on your site, along with all of the other important details such as adding hreflang tags and creating a multilingual XML sitemap.
If you want to try it out, install the free TranslatePress plugin from WordPress.org and follow our guide on how to create a multilingual WordPress site.
TranslatePress Multilingual
The best WordPress multilingual plugin that lets you automatically create a subdirectory for each language on your site.
Get the pluginDo you still have any questions about choosing between a subdomain vs subdirectory for your multilingual website? Let us know in the comments!