Skip to main content
SlapMyWeb
Technical SEO

Subdomain vs Subdirectory

Whether content lives at blog.example.com or example.com/blog — and why the subdirectory usually wins.

A subdomain is blog.example.com; a subdirectory is example.com/blog. Google says it can handle either, but in practice a subdirectory inherits the parent domain's authority more reliably, because a subdomain can be treated as a separate site. Unless there is an infrastructure reason to split, the subdirectory is the safer default.

Definition

The two ways to place a section of a site differ in how search engines may consolidate their signals. A subdirectory is unambiguously part of the main site. A subdomain may or may not be treated as one — Google decides case by case.

The practical evidence is one-sided enough that most large sites have migrated blogs and docs from subdomains into subdirectories, and reported gains from doing so. SlapMyWeb did exactly this in 2026: moving its tools from a subdomain back to /tools/ after the split cost page-one rankings.

Why It Matters

This decision is expensive to reverse: it is a full migration with redirects, and rankings usually dip before they recover. Getting it right at the start avoids paying twice.

Example

example.com/blog shares the domain's authority by default. blog.example.com may have to earn its own — which for a young domain means starting from nothing twice.

What Google says, and what sites report

Google's position is that it handles both, and that the choice should be driven by what is easiest to maintain. That is accurate as far as it goes: a subdomain is not penalised and can rank perfectly well.

The nuance is in how signals consolidate. A subdirectory is unambiguously part of the parent site, so authority earned anywhere on the domain applies to it. A subdomain may be treated as a separate site — Google decides case by case, and you do not get told which way it went.

What tips the practical balance is the volume of migration reports going one direction. Sites move blogs and documentation from subdomains into subdirectories and report gains; the reverse migration is rare. That asymmetry is the strongest available evidence, even without a mechanism stated outright.

This site's own experiment

SlapMyWeb ran this test unintentionally. In May 2026 its 167 tools were moved from /tools/* to a tools. subdomain, to stop the tools diluting the main domain's classification as an audit product.

The classification argument was sound. The ranking cost was not anticipated: tool pages that had held page-one positions lost them, and the subdomain did not inherit the apex's authority. The move was fully reversed in June 2026 — tools back on /tools/*, with the subdomain 308-redirecting to the apex.

One case is not proof, but it is a clean one: same content, same team, same period, only the hostname changed.

When a subdomain is still the right answer

There are real reasons to accept the trade-off. A section on entirely separate infrastructure — a status page that must stay up when the main site does not, a documentation platform run by a vendor, an application with its own deployment — is often only practical on a subdomain.

The same applies where content should not share the parent's reputation: a user-generated subdomain, or a regional business that is genuinely a separate entity.

What is not a good reason is convenience during a rebuild. A subdomain chosen because routing was easier is a migration you will pay for twice — once to move there, once to move back.

If you migrate, the redirect map is the whole job

Moving from a subdomain to a subdirectory is a site move, and the failure mode is the same as every site move: redirecting to the wrong place.

Every URL on the subdomain needs a 301 to its exact counterpart in the subdirectory — blog.example.com/post to example.com/blog/post, path preserved. Redirecting the subdomain wholesale to the subdirectory root discards every post's accumulated signals in one line of configuration.

Keep the redirects permanently. Links to the old subdomain will exist for years, and each one that dead-ends is a link you paid for and then discarded. Expect several weeks of unstable rankings while both URL sets are recrawled and consolidated — this is normal, and reverting mid-migration is how sites end up worse than either configuration.

How SlapMyWeb checks this

The audit reports which hostname each URL is on and whether the site enforces a single canonical host, so a blog reachable at both blog.example.com and example.com/blog shows up as duplication rather than as two healthy sections. It also follows redirects and reports chains, which is what a half-finished subdomain-to-subdirectory migration leaves behind.

Know the term.
Check your own site.

A free audit tells you whether this is currently costing you score points — and exactly what to change.

Run a free audit
Free foreverNo signupResults in 30s