Subdomains vs. Subdirectories: What’s the Difference?

Deciding how to setup multiple websites or different sections of websites often comes down to a long standing question, "Which is better for SEO: subdomains or subdirectories?"

What's a subdomain? What's a subdirectory? What’s the difference between the two? How and when should you use these? We’ll define these two terms, discuss the pros and cons of each, and help you decide which system works best for your business.

Subdomain vs. Subdirectory

Your website organization impacts SEO. You have some options, and choosing the right approach can make a difference. Let's first look at how domains, subdomains and subdirectories work.

How Do Domain Names Work?

A domain name is the address of your website, pointing users to the server location that hosts the application. Computers use the internet protocol (IP) address of an individual computer to find a website, but an IP address is just a string of numbers. A domain name acts as a kind of shorthand that points to the IP address. It's a lot easier to remember

A domain name can be any combination of letters and numbers used with a suffix like .com. This suffix is also called a top-level domain (TLD). There are many other TLDs: .gov, .net, .org are popular. The domain name you choose will be the root domain that your site is hosted on.

Subdomains and subdirectories (or subfolders) have to do with the organization of pages under that top-level domain. They’re two different ways of equipping root domains with new features like a blog or a storefront page.

What Are Subdomains?

Put simply, a subdomain is a domain that is part of another primary domain.

Subdomains are often easier to set up for remotely hosted websites, as their servers can be scattered around in different locations. For many modern sites that use cloud hosting, a subdomain can be a faster approach to getting your site off the ground.

An example of a subdomain URL is: support.callrail.com. This subdomain hosts a website for customer support. The separate marketing site exists at www.callrail.com. These two sites are seen as separate entities to Google. There are links between them, but for SEO, their backlink profiles are considered separate for the most part.

In your domain's DNS settings, you can setup different sudomains with A records to point to difference servers. Choose the subdomain you want to setup and the IP to point it to. Depending our your setup, you may need to use a combination of CNAME and A name records.

What Are Subdirectories?

Subdirectories are another way of organizing that helps to consolidate different sites onto one domain. Also called subfolders, subdirectories organize sites and their pages into a directory of folders, like files on a computer. An example of a subdirectory URL is callrail.com/blog. Subdirectories might require additional setup work to point different folders at different servers.

Should I Use a Subdomain or Subdirectory for My Website?

The system you use for your site depends on you and your business. Generally, subdomains are ideal for larger businesses with multiple sizable entities, while subdirectories are a better approach for small business owners who want to ensure all SEO efforts are concentrated on one domain.

Subdomains, Subdirectories, and SEO

Do search engines favor one option over the other, though? According to Google’s Webmaster Trends Analyst John Mueller, not really. In an interview with Will Critchlow from Moz, Mueller said that SEO concerns shouldn’t affect your choice between subdomains and subdirectories: Google’s crawlers and algorithms don’t take the setup into account when ranking a page.

Google has been rather consistent in addressing this question, as many prominent Googlers have defended Mueller’s claim. Another Webmaster Trends Analyst, Gary Illyes, has also gone on the record at multiple events to reinforce the company’s official position on the subject.

That said, some site owners have reported that a simple change of subdomain to subfolder, can result in a traffic increase. Mueller says there could be situations where the search engine treats certain pages differently, even though it sees both setups as equal.

For example, is a page a part of a larger site or a site on its own? Sometimes, Google’s algorithm will see a subdomain as separate but treat a subdirectory page as part of a larger site and therefore rank it differently. But Mueller stresses that this isn’t a guarantee.

“In general, we see these the same,” he said during a Google Hangout session on the subject. “I would personally try to keep things together as much as possible. So, if it’s the same site then try to put them on the same site, essentially, and use subdomains where things are really kind of slightly different.”

In other words, the best structure for your site will depend on the structure of your business or businesses. Google’s Public Search Liaison Danny Sullivan may have put Google’s perspective on the matter into clearest terms when he followed up on Mueller’s take: “What’s better for SEO is generally doing what’s best for your users and yourself.”

When Is a Subdirectory the Best Option?

Subdirectories are usually the best choice for a reason: a subdirectory setup consolidates all SEO efforts to one domain.

And while Google’s official stance is that it treats both subdomains and subdirectories the same, it has also admitted that there are instances where search results will reward subdirectories.

Switching from a subdomain to a subdirectory setup may increase a site’s ranking. That’s because Google usually sees all the different sections of a subdirectory site as part of a whole.

Google usually treats each site in a subdomain-organized site, as a separate entity. This can dillute some link value. If a site makes a list of the ten best companies in your industry and backlinks to a blog post on your website at blog.mysite.com, that attribution would only increase the authority of your blog, and not as much towards a separate community site.

Consolidating relevant subdomains into a subdirectory setup will consolidate the backlink profiles. Each site adds authority to the whole website—potentially boosting your rankings.

When Is a Subdomain the Best Option?

If your business is on the larger side, and you have the time and staff to maintain several different properties, then you might want to opt for a subdomain approach. Subdomains are perfect a large brands that has separate, unique entities. They can even be easier to implement from an operations standpoint, especially if you’re serving different applications or platforms like:

  • Community forums
  • Application status report
  • Helpdesks
  • Varied content management systems (CMS)

Subdomains are preferable if a brand has several large, distinct entities that need their own websites. Disney, for example, uses subdomains for its parks, video, and other properties to maintain them as separate entities.

If your brand is organized around topics big enough to warrant their own domains, they might be strong enough to stand on their own individual backlink profiles. Combining such domains into a subdirectory setup would likely only sacrifice link equity due to changing every URL.

Prominent, robust interlinking between your subdomains is essential to spreading out link value evenly. Links should be relevant, find ways to cross link that are helpful to a user.

How to Set Up Subdomains and Subdirectories

Setting Up a Subdomain

Subdomain setup for different sites or applications is quite a lot simpler, because each subdomain you setup can point to a different server address.

  1. Log into your website hosting dashboard.
  2. Select the root domain you want to use.
  3. Look for an option to add a new subdomain, or A name.
  4. Enter a name for the subdomain, and the IP address of the server you want to point it to.
  5. Once the DNS record is updated, it will be ready to use once it has resolved, which can take up to a day (depending on the TTL value).

Setting Up a Subdirectory for a different site

When you want to have an entirely different application or CMS setup on a folder, it gets a little more advanced. You likely need some help from people who have more familiarity with the web hosting setup.

Different web applications exist at unique server addresses. A domain (or subdomain) is setup to point to one server address (IP address).

To host a separate application on a folder, you need to intercept the request before it gets to the server and reroute that request to another server.

You'll need to setup a reverse proxy.

A proxy server sits between the client (your website user's browser) and the server (where the site is hosted). This go-between server takes requests from clients and sends them to the server or resources from the server and sends them to the client.

There's many uses for a proxy server, but the reverse proxy is useful for hosting sites on subfolders because the server uses the proxy server to send requests to other servers based on certain criteria. The criteria here would be the folder name.

The basic idea is that when a request for a specific folder name comes in to the proxy server, it knows to send that to a different server than the main server the domain points to. The correct server then sends the resource back through the proxy to the user, and they see the intended site.

Should You Change Your URLs?

If you run a very large site using subdomains, you may consider switching to subfolders to consolidate link value. The risky part of that is every URL you have would be changed.

Google’s Mueller has advised site owners on several occasions to “keep the same URL for the long run” so as to avoid the time it takes for Google’s algorithms to reprocess everything after the change.

If you decide to consolidate, do so with the understanding that your link equity will be reduced: Your historical link value will filter through redirection, which “leaks” some value. Redirection is necessary to maintain value, but these leaks are inevitable. With a large and complex site, redirecting mistakes are bound to happen—and overlooking the minutest of details could spell disaster for your organic search traffic.

In general, it’s best to stick with your domain and URLs for the life of your business. That means choosing a good URL structure that will stand the test of time. Durable URLs address the problem of pages that might need to be updated over time without changing their URL and confusing the search engine. Best practices for creating durable URLs include:

  • Keep URLs short and readable
  • Don't use too many folders in a URL
  • Name organizing folders with words that provide clarity and context
  • Use words that won't be outdated soon

You will likely have to change URLs at some point, so make sure you have redirection capabilities ready when you do. If you change URLs without properly redirecting old to new, your SEO efforts will effectively start over from scratch.

If you must change your URLs, make sure its a good long term choice, so you won’t have to keep doing so in the future.

Key Takeaways

To recap, your business should use subdomains if:

  • You have many large, unique websites or business entites
  • You have the resources to maintain large sites that can stand on their own subdomain
  • Setting up a reverse proxy sounds daunting

Subdirectories are a better idea when:

  • Each site supports the same business entity
  • You want to make sure all link equity is consolidated on one domain
  • You have the technical abilities to setup a reverse proxy

Consider these factors carefully when working website organization into your overall SEO strategy. Take into account the amount of time and energy you can dedicate to maintaining the site and what the site will be used for.

Of course, website organization should only be one part of your content strategy, so make sure you understand all the factors for better SEO performance.