Loading...

Blog

Latest blog posts
Subdomain vs. Subdirectory: Which Is Better for SEO?

Subdomain vs. Subdirectory: Which Is Better for SEO?

One of the biggest 'arguments' in SEO is the subdomain vs. subdirectory debate. 

Which is better for SEO? Does it actually make a difference? If a blog is hosted on a subdomain, should you migrate it into a subdirectory? What's Google's stance on this?

These are just a few of the many questions commonly asked in the SEO community on social media, often met with differing responses.

And in this guide, we want to clarify the confusion and help settle the debate about 'subdomain vs. subdirectory.' We'll dive deep into the technical SEO considerations that you need to take and outline the instances when they make the most sense to use.Specifically, we'll look at:

Understanding Subdomains and Subdirectories

Before we look at which is best for SEO, let's first take a quick look at the technical difference between subdomains and subdirectories.

Subdomain: blog.yourdomain.comSubdirectory: yourdomain.com/blog/ 

Essentially, a subdomain is a child of the parent domain, and they are sometimes used for hosting:

Blogs ecommerce stores (when these are part of a larger site) Internationalization (different websites to target different markets) Separate mobile sites Quote forms 

Notice that in the subdirectory (also known as a subfolder) example, the /blog/ sits within the main domain. It's part of the main yourdomain.com website in the same way that any other page would be. For all intents and purposes, this is just another page on this website.

But a subdomain sits outside of the main domain; it sits within its own partition of the domain. In this example, it's being used to host a blog.

A subdomain will always sit before the root domain when looking at a URL, whereas a subdirectory will always sit after.

If you're currently not sure how many subdomains your site is using, or if it's using any at all, you can use the Semrush Site Audit Tool to view your site's structure, including any subdomains:

Oklahoma seo services 7

Just make sure when setting up the tool that 'including all subdomains' is selected for the crawl scope.

Consultant seo services 7Why is there such a significant debate in the SEO community between subdomains and subdirectories? And is one better than the other when it comes to ranking on the SERPS?

Giving Context to the Debate

Let's clear one thing up; your website's structure significantly impacts your organic search performance. 

The choice between a subdomain or a subdirectory for certain areas of your site can help or hinder your ability to drive growth. But similarly, there are instances when it does make sense to host part of your site on a subdomain.

This is very much an 'it depends' scenario. It's important that you understand the different use scenarios and how they can impact your site's organic performance. 

So then, where does the confusion come from?

This debate is sparked by the fact that Google treats subdomains as separate entities to your main domain, largely because some websites place different content on subdomains that shouldn't really be associated with the main site. Or in some instances, those subdomains of the main domain are controlled by different people.

So, to go back to our example above:

yourdomain.com/blog/ is treated as part of yourdomain.com by Google's algorithm blog.yourdomain.com is not treated as part of yourdomain.com, but as a separate entity

This means that the content (and its valuable assets, such as backlinks) hosted on a subdomain isn't being taken into account by Google's algorithm when ranking the main domain. 

It's almost as though the content hosted on the subdomain is hosted on an entirely different domain for ranking purposes, and thinking about it in this way can help it become a little clearer. 

While this may not sound like a good thing, sometimes it makes perfect sense for a subdomain to be seen as a separate entity to the main domain, especially when the subdomains should be seen as representing separate businesses or divisions.

Often a subdomain will be linked (either via a navigation menu or internal links) to the main domain, but sometimes it won't be. This is a key factor when deciding which route you should go down when setting up your website (or a new section of it).

What Does Google Say About Subdomains vs. Subdirectories?

It's definitely not a case of saying that subdirectories are good for SEO and subdomains are bad. It's not that simple.

But we need to understand where the different recommendations come from and how they compare with Google's guidance.

In the video below, Google's John Mueller took a dive into the subdomain vs. subfolder debate in a 2017 video. This advice hasn't changed between then and today.

Seo ranking services 7

In this video, John states that:

Google web search is fine with using either subdomains or subdirectories.

— John Mueller, Google

And also that:

We do have to learn how to crawl [subdomains] separately, but for the most part, that's just a formality for the first few days.

— John Mueller, Google

Subdirectories: The SEO Debate

If Google's saying that using subdomains is fine, then what's the problem?

To answer this, we need to recap on two of Google's top 3 ranking factors:

Content Links

Just because Google states that it's fine to use either subdomains or subdirectories, that doesn't mean to say there aren't benefits of one over the other.

To put it another way:

Will you be penalized for hosting your site's blog content on a subdomain? No. But could that content (and any links) help your main domain rank better and earn more traffic if they sat there instead? Yes!

If content and links are split between a subdomain and the main domain, those two entities' overall 'authority' is lower than if everything sat on the main domain (using subdirectories).

That's why it's common to see an uplift in overall organic visibility and traffic (compared to the two viewed separately) when migrating relevant subdomains into subfolders on the main domain.

For example, just look at the example below shared by Andy Chadwick and the resultant growth when he migrated a blog (previously hosted on a subdomain) onto the main domain (now as a subfolder).

I shared this on Twitter about 4 weeks ago, just wanted to re-share as it's still going up... pic.twitter.com/KVKbdmnLfN

— Andy Chadwick (@digitalquokka) October 29, 2020

There are plenty of great success stories of significant gains seen when moving content from a subdomain into subfolders.

Just take a look at what happened when one of Stephen Kenwright's clients moved their blog from a subdomain to a subdirectory:

Not wanting to start an argument or anything, but here's what happened when a retail client's blog was moved from a blog. subdomain onto a /blog/ subfolder ? pic.twitter.com/LxMWBV2JAu

— Stephen Kenwright (@stekenwright) October 20, 2020

Or one of the many other examples that's regularly shared on Twitter. 

For the SEO crew out there:Seen 20%+ lift in organic traffic since moving blog from subdomain to subfolder + took over a bunch of featured snippets.Wish we did it sooner ? why are there so many differing POVs on this when it seems to always work?

— Dave Gerhardt (@davegerhardt) November 30, 2018

Let's not dismiss that these examples are all talking about migrating blogs from subdomains to subdirectories and that, by default, blogs are typically content-rich (often, most of a business's best content sits on a blog) and that blog content commonly earns backlinks. The subdomain, here, has both topical relevance and authority that's closely aligned to the main domain.

So what's happening here is that the subdirectory is inheriting the authority (from content and links) and relevance during the migration and, when this is combined with the existing authority of the main domain, the result is an increase in authority (and resultant organic visibility) that is greater than when the two are seen as separate entities.

Essentially, great content that's earning great backlinks will almost always contribute to better SEO results when hosted on a subdirectory rather than a subdomain.

Subdirectories: The Challenges

In an ideal world, you would have full control over whether subdomains or subdirectories are used for various areas of your site.

But the reality is that it's usually not quite that simple, and it's common that compromises must be made based on technical limitations.

These can include:

Not being able to set up international sites in subfolders (i.e., yourdomain.com/us/ and yourdomain.com/es/)  Developers not wanting to host a WordPress blog on the same server as an ecommerce store A desire to use a dedicated blogging platform rather than the built-in blog of an ecommerce platform A quote form or other feature that is unable to sit on the same server as the main site due to being written in different coding languages

These are just a few examples of what decisions are necessary to use subdomains or subdirectories. 

As an example, Shopify forces you to use subdomains for international stores (de.yourdomain.com rather than yourdomain.com/de/), and using subdirectories isn't possible, whatever the benefits might be. 

Similarly, if you want to use a WordPress blog and your site runs on a CMS that doesn't support this on the same server (or give you access to do this). A developer will often suggest using a subdomain for ease (although it's sometimes possible to use a reverse proxy in this scenario). 

Subdomain or Subdirectory: Which is Right for Me?

One thing that's for certain is that there's still a lot of confusion on whether subdomains can harm your SEO efforts or not, as we can see in this recent tweet:

This is a great question. You’re choosing between a url path or sub directory like /blog and a subdomain like blogs.whatever. I believe it’s absolutely up to your own preference and there are no major google juice differences. URLs are UI, use the one you like. https://t.co/9rCHsmVWEY

— Scott Hanselman (@shanselman) December 10, 2020

While the intention here is genuine, it shows that there's still a lot of division on whether or not Google treats these any differently.

For the most part, the SEO community agrees that if there are no technical restrictions, legal restrictions in different countries, etc., you should host content in a subdirectory rather than on a subdomain.

I've seen two startups that have raised Series As this week with blogs hosted on a subdomain.Someone should let them know that's terrible for their SEO.

— Nikhil Venkatesa (@realictionboy) December 10, 2020

That said, you should also consider the context of this decision and what it is that you're considering hosting on a subdomain. 

If it's a blog or ecommerce store, then the preference should always be that this content is hosted in a subdirectory.

But if it's a quote form or content that's unlikely to add value to your site from either a relevance or topical perspective, don't just default to using subdirectories. 

If there's a reason to use a subdomain, then this shouldn't be ignored, and features like quote forms or even support centers (often behind a login screen) aren't going to harm your site's SEO potential if hosted like this. In fact, you'd likely see no difference using subdirectories in these instances. 

In most cases, a subdirectory takes preference over subdomains from an SEO perspective. However, there are considerations that you need to think about before making a decision.

Content such as your blog is an easy decision, but other types of content and site features must be considered alongside each option's pros and cons; it's not always an easy choice to make.

Just be sure to understand how your decision can impact your site's SEO performance and bring these justifications to the table when discussing the right way forwards with developers and other stakeholders!

Innovative SEO services

SEO is a patience game; no secret there. We`ll work with you to develop a Search strategy focused on producing increased traffic rankings in as early as 3-months.

A proven Allinclusive. SEO services for measuring, executing, and optimizing for Search Engine success. We say what we do and do what we say.

Our company as Semrush Agency Partner has designed a search engine optimization service that is both ethical and result-driven. We use the latest tools, strategies, and trends to help you move up in the search engines for the right keywords to get noticed by the right audience.

Today, you can schedule a Discovery call with us about your company needs.



Source: