Subdomains vs. Subdirectories: Which Is Better for SEO?

Evan Hall, SEO Strategist

The one topic I’ve seen Google and SEOs disagree on the most is the best place to host content – subdomains or subdirectories. SEOs say subdomains aren’t optimal, and Google says it doesn’t matter because they can read and understand your content wherever it is. Google even put out a video to clarify the matter, but no one was satisfied with their answer.

So what’s the disconnect? While it’s true that Google has no problem understanding content on subdomains, SEOs say that content doesn’t perform as well in Google’s search engine. Google disagrees and says that subdomains aren’t a problem, yet the SEO industry continues to publish case study after case study that refutes Google’s claim.

We should host our content on our primary domains – unless we have a very good reason not to. Even if Google turns out to be correct, and it doesn’t matter for performance, organizing your content in subdirectories on your primary domain is the better decision for your infrastructure and long-term SEO.

What’s the Difference Between a Subdomain and a Subdirectory?

Example of URL best practices for SEO

If you’re given the choice between hosting a blog for your website at “blog.brand.com” and “www.brand.com/blog,” will the choice matter? Is there a big difference between putting “blog” at the beginning of a URL instead of the end?

There is a difference, but it’s subtle and goes back to the early internet.

Subdomain

In the early days of the web, a single server could host multiple services and they would be assigned to different subdomains. It was conventional for system administrators to host additional services on subdomains, like “mail.brand.com” for the email server or “ftp.brand.com” for filesystem access. 

Even “www.brand.com” is a subdomain, but we don’t usually think of it that way because the service we use most of the time is the website, but it does have a purpose. 

Subdomains should be used to organize services that are separate from each other but still part of the entity that owns the root domain (“domain.com”). They’re still used this way, even for separating websites owned by the same brand.

Subdirectory (or Subfolder)

Subdirectories, also called “subfolders,” were originally for allowing users to navigate a website according to the file structure of the server hosting the website. Now, most websites store their content in a database and display it to users through a content management system, so the server’s file structure is irrelevant. 

Organizing URLs like a directory as if there were a file structure is still useful because it lets users know “where” they are on a website. It also communicates to users that the content on any given URL is closely related to the subdomain they are on. For example, if the URL for a blog post was “www.brand.com/blog/guides/10-best-blue-widgets” a user could infer that this URL goes to a blog post, in the Guides category, about blue widgets.

The Debate: Subdomain vs. Subdirectory

The debate between using subdirectories or subdomains for organizing content isn’t really about what helps users understand a website. It’s mostly about what will yield the most organic search traffic on Google and other search engines. 

SEOs want to know if a brand’s content is split between two (or more) subdomains, will Google treat the subdomains as separate sites or a single one? 

How Google handles the situation is important. If Google treats subdomains separately, then ranking signals related to expertise, authority, and trust might not be shared between them. 

Based on experiences like this, many SEOs think Google does treat them differently in a way that makes subdirectories generally better for performance.

Google’s Point of View

Google has always treated content separated by subdomains in a way that suits their needs. 

As far back as 2007, Google said that they treated subdomains as separate for one aspect of ranking. However, they found that it led to people abusing how Google handled domain diversity in the SERPs. 

This video by Matt Cutts from 2012 explains why they had to adjust that approach to prevent abuse:

Later in 2017, John Mueller recorded a video stating, “Google Web Search is fine with using either subdomains or subdirectories.” After verifying each subdomain in Search Console, they will be crawled as if they were one website.

The problem with this answer is that it doesn’t address the original question: What’s best for SEO – subdomain or subfolder?

People want to know if separating content by subdomain will make a difference in their rankings, but Google wants us to know that Google’s needs are taken care of either way. But, they also want us to understand that Google doesn’t have a preference and that we should do what’s easiest. I disagree with Google on both points, and I’ll get to why.

SEOs’ Point of View

SEOs want to know three things:

  • If Google treats content organized by subdirectories differently than content separated by subdomains
  • If there is different treatment, which systems distinguish between them and how they work
  • Which configuration is ultimately better for rankings, traffic, and revenue

For the first point, Google wants us to think they treat it all the same, but then they will post stuff like this:

I take this tweet to mean that multiple systems inside of the major parts of Google Search (crawling, indexing, ranking) treat subdirectories and subdomains differently depending on what Google’s needs are. Their helpful content classifier is just one of those systems.

Google doesn’t want us to know which systems do what and how because it makes them vulnerable to abuse. If the Helpful Content Update had a strong impact on rankings, many SEOs would begin testing to see if their content worked better on one domain or several, just like the domain diversity problem Matt Cutts discussed.

Due to Google’s secrecy, the second point is generally not answerable. Someone would have to pick a specific part of Google and determine how to test its reaction to using subdomains to reach a conclusion.

For the third point, many SEOs have consolidated their content into one subdomain and found their overall performance improved. Due to how many case studies have come out, it’s widely believed among SEOs that using subdirectories to organize content is better than subdomains.

From the list of case studies Rand posted, three stand out to me as the most compelling.

The first case study is from Jesse Heap of Janssen. He saw a 40% increase in sessions after moving a blog from a subdomain (blog.pinkcakebox.com) to a subdirectory (www.pinkcakebox.com/blog). 

This type of migration is commonly recommended for company blogs but they rarely limit their changes to just the URLs the blog uses. Usually, marketers will take the opportunity to change the design of the blog or clean up old content, or make some other improvement that doesn’t isolate the URL change. 

Based on the before and after snapshots on Archive.org, the only change Jesse made was migrating the blog, which makes this case study notable. 

Via Jesse’s LinkedIn post

The second case study is from Johannes Beus at Sistrix. Using their proprietary SERP visibility metric, they found three clear examples of large brands moving a section of content from a subdomain to a subdirectory with a subsequent improvement in organic visibility. 

Via the Sistrix blog

The third case study is from Timo Reitnauer of iwantmyname, with an example of moving a blog from a subdirectory to a subdomain – the opposite direction people usually go with a migration. After six months, they found their initial decrease in traffic never improved

One factor involved was Google launching their update that gave ranking bonuses to websites using HTTPS, and their new CMS didn’t support HTTPS at the time. However, that update didn’t appear to be big back then. 

The other factor was changing CMS. This migration wasn’t as clean as the example with Pink Cake Box. If iwantmyname didn’t design their new blog as well as their previous one, then a worse design could explain the performance decrease.

Via the iwantmyname blog

Taken with lots of anecdotal evidence over the years, SEOs have good reason to believe that subdirectories tend to perform better than using several subdomains. 

Impact of Subdomains & Subdirectories on SEO

Deciding where to host your content isn’t just about what it communicates to users and how Google treats it in its algorithms. There are also practical day-to-day SEO concerns to consider.

Link Authority and Backlinks

Where would you rather host your content, on two domains with 1,000 backlinks each or one domain with 2,000 backlinks? Which setup would you rather maintain years down the line?

If you’re investing in link building for content that lives on a separate subdomain, you must ensure that the subdomain redirects its URLs after it’s retired. I frequently see great backlinks pointing to forgotten legacy subdomains in clients’ broken backlinks. 

Suppose there are multiple URLs on a subdomain that you need to redirect to several other URLs. In that case, the redirection isn’t as trivial as setting up a DNS record to blanket redirect everything to a single URL. That legacy subdomain must have a web server attached that can handle all those specific redirects. 

International Subdirectories

International websites are usually implemented in three ways: ccTLDs, subdirectories, and subdomains. Subdomains have no upsides over the other two options. ccTLDs aren’t optimal either, but at least they contain a strong signal about how they want to target international users.

Google’s recent update to their URL structure advice in Search Essentials doesn’t even mention subdomains, which is curious.

Using a subdirectory strategy for international websites is something I see more brands using every year. I think they realize the benefits of having everything in one place: one CMS, one development team, better content parity, and easier management of hreflang tags.

Mobile Subdomains

Creating a subdomain to host the mobile version of a website isn’t as popular as it once was, and it’s becoming rarer every day, but they are still out there. 

Wikipedia is a popular example of a website that hasn’t adopted responsive design. They also use subdomains for their international strategy, so they must maintain a mess of subdomains like en.m.wikipedia.org and fr.m.wikipedia.org. 

The future of the web is responsive and mobile-first. It’s the easiest and simplest way to adapt to modern internet usage. Brands that disregard this tend to tack on mobile subdomains that plague their technical teams with problems like:

  • Wasted crawl budget and canonicalization issues
  • Server-side device detection and redirect handling
  • Maintaining content parity between mobile and desktop sites
  • Shrinking content and navigation to fit mobile screens

There is no reason not to use responsive design at this point.

Cost

How many websites do you want to pay for? How many web applications do you want your engineers to maintain? Every subdomain you add to your website introduces another hosting environment to your technology stack and all the business concerns that come with it.

A new subdomain could mean additional costs for any of these:

  • 3rd party hosting or subscription fees
  • Additional SSL certificates or a wildcard certificate
  • Developer hours for the subdomain CMS
  • Additional colocation space or network hardware

You would also have to manage the subdomain’s login credentials, analytics, security, and webmaster consoles. These headaches add up fast if you have regulatory compliance to worry about.

When to Use a Subdomain? (Occasionally)

There are a few cases where a subdomain makes the most sense for your brand outside of technical necessity. Usually, it’s for a sub-brand or a product substantially different from what the brand normally sells.

If your content satisfies most of these criteria, then you should probably use a subdomain:

  • The content or branding isn’t different enough to justify an entirely different domain
  • Users would be confused if they navigated between the two content experiences
  • The content sells a completely independent product or is part of a portfolio of products

Google itself is pretty good at this. They have developers.google.com, assistant.google.com, cloud.google.com, store.google.com and the list goes on. Each subdomain is an aspect of Google but independent and hosts its own thing.

Another valid case for a subdomain is content that will never need to be indexed by a search engine. Paid landing pages, customer portals, and company intranets are all good examples. 

Customer support and user community sections can stay separate. I don’t think investor information, careers, and user-generated Q&A content will help the sales website rank because the content isn’t relevant to its KPIs.

For example, Getty Images has its Careers (careers.gettyimages.com) and Investor Relations (investors.gettyimages.com) sections on subdomains. The audiences for these sections probably aren’t relevant to selling stock photo licenses.

When to Use a Subdirectory? (Most of the Time, Sometimes With a Reverse Proxy)

The best way to avoid dealing with the subdomain question is to start with a website or CMS that does everything you want on one domain. I often find brands that try to tack on the functionality later because they don’t foresee an upcoming need.

Begin with an infrastructure that will do everything you need. If you need a blog or eCommerce experience, choose a CMS with those built into the app. Or you could even use an extensible CMS, like WordPress or Drupal. Shopify has a lot of SEO quirks, but it’s relatively solid and comes with a few site speed improvements out of the box.

Suppose you already have a website and do need to add functionality your existing infrastructure doesn’t support. A few common additions brands need to make are:

  • Their blog
  • Ecommerce
  • Customer support
  • Technical documentation

Usually, the easiest way to attach these to an existing site is to host them on a separate server and map it to a subdomain. However, putting them in a subdirectory is straightforward with a reverse proxy.

A reverse proxy is a way to make other servers accessible through a subdirectory instead of a subdomain. They do a lot more, but their purpose for SEO is mostly that.

Suppose you were adding a blog to your PHP website and hosting it on WordPress. Typically, the easiest way to do this is to map blog.brand.com to the server hosting WordPress, but given how the SEO chorus says, “use a subdirectory!” you ask your engineers to invoke a reverse proxy. 

With that reverse proxy, you can host the blog at www.brand.com/blog, and the reverse proxy will reroute all requests in the /blog subdirectory to the WordPress server instead of the PHP server. 

From Google’s point of view, /blog is part of the www.brand.com website even though that subdirectory serves content from a different server. 

Google Will Keep Its Secrets

I think the major reason Google won’t give us a straight answer about how they treat subdomains is that no single person knows. For a Google spokesperson to begin to answer the question, they would need knowledge of all the parts of Google Search that “care” about subdomains, then investigate each part to see what it does. 

Supposing they did that, how much could they say publicly? It’s vital for Google to prevent abuse by not letting the public know too much about how its systems work. 

I don’t think we’ll ever get a satisfying answer from Google about the topic. Hopefully, they advance to the point where it doesn’t matter how our content is organized, and case studies no longer show a preference. Until then, subdirectories are probably better for your situation.

Start call to action

See how Portent can help you own your piece of the web.

End call to action
0

Leave a Reply

Your email address will not be published. Required fields are marked *

Close search overlay