Subdomain vs Subdirectory

Subdomains and subdirectories are functionally equivalent for SEO. Google decides per site how to treat each — and most migration "wins" are confounded.

First published: Jun 26, 2026 · Last updated: Jul 18, 2026 · Advanced
demand #9 in Website Structure#103 in Technical SEO#136 on the site
1 evidence signal on this page

A subdomain (blog.example.com) is a separate hostname; a subdirectory (example.com/blog/) is a path on the same hostname. Google has no blanket preference and decides per site whether a subdomain is treated as part of your site, based on integration signals like internal linking. The case studies showing big 'wins' from moving subdomain→subdirectory are almost always confounded — better internal linking, content pruning, or a CMS upgrade rode along with the URL change. My advice: don't migrate for URL structure alone; the risk usually outweighs the upside. Subdirectories do have real, concrete operational advantages (one Search Console property, one analytics setup, site names in search), but those are convenience, not a ranking edge.

TL;DR — Subdomains and subdirectories are both viable for search, but they are operationally different. Google evaluates per site whether a subdomain is treated as part of your site or as a separate entity — the deciding factor is integration (internal linksAn internal link is a hyperlink from one page on a website to another page on the same website. Internal links help search engines discover your pages and pass ranking signals (PageRank and anchor-text context) between them., consistent UX, related content), not the dot-vs-slash. The case studies showing big gains from subdomain→subdirectory moves are almost always confounded: better internal linkingLinks between pages on the same site., content pruning, a CMSA content management system (CMS) is software that lets users create, manage, and publish digital content — like blog posts and pages — without writing raw code. WordPress, Drupal, and Joomla are the most common open-source CMS platforms. upgrade, or analytics changes rode along. My position: don’t migrate for URL structureURL structure is how the parts of a web address — scheme, domain, path, query string, and fragment — are organized and formatted. It mostly affects crawling, usability, and how engines understand a page, not rankings directly. alone — the risk usually outweighs the upside. Subdirectories can carry operational advantages (shared routing, analytics, and publishing systems), but those are convenience wins, not a ranking edge. Bing’s concern is subdomain abuse (leasing, PBNs), not legitimate subdomain use. And per Google’s November 2024 site-reputation-abuse policy, moving content between structures doesn’t fix a spam violation.

Evidence for this claim Search Console Domain properties aggregate all subdomains and protocols, while URL-prefix properties can isolate a particular subdomain or path prefix. Scope: Current Search Console property behavior; not a ranking preference. Confidence: high · Verified: Google Search Console: Add a property Evidence for this claim Moving content between hosts or paths changes URLs and should use permanent redirects and updated canonical/internal signals. Scope: Current Google site-move operations, distinct from any inherent subdomain ranking claim. Confidence: high · Verified: Google Search Central: Site moves with URL changes

What they actually are

A subdomain is a prefix before the root domain, separated by a dot — blog.example.com. It’s technically a separate hostname, so it can point at a different server, run a different CMS, and be owned by a different team. A subdirectory (subfolder) is a path segment after the domain, separated by a slash — example.com/blog/. It’s always the same hostname, and so the same “site” from a crawlingCrawling is how search engines use automated bots (like Googlebot and Bingbot) to discover URLs and download pages. A page has to be crawlable to be indexed, but crawling on its own isn't a ranking factor. and analytics standpoint. There’s a third option for international work — a ccTLDCountry-code top-level domain like .de or .co.uk — a strong geotargeting signal. like example.de — which is always treated as a separate site.

What Google actually says (and what it means)

Google’s official documentation is blunt: “You should choose whatever is easiest for you to organize and manage. From an indexingStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed. and ranking perspective, Google doesn’t have a preference.” That’s the headline — no blanket advantage either way.

The nuance is more important than the headline. John Mueller has said, “In general, we see these the same,” but added that he’d “personally try to keep things together as much as possible.” The key word is personally — that’s a preference for operational simplicity, not a statement that subdirectories rank better.

The deepest point Mueller has made is that there’s no blanket rule at all: “sometimes that can include sub-domains, sometimes that doesn’t include sub-domains. Sometimes that includes sub-directories, and sometimes that doesn’t include specific sub-directories.” In other words, Google decides per site whether a subdomain (or even a subdirectory) is treated as part of the main site. The signals it uses are integration signals: internal linking between the section and the root, consistent branding and UX, thematically related content, and a coherent sitemapA sitemap is a file that lists the pages, images, videos, and other files on your site so search engines can discover them. It helps discovery, but submitting a sitemap doesn't guarantee crawling or indexing. structure.

Gary Illyes confirmed the flip side at Pubcon 2023: subdirectories can be treated as separate sites too — “It’s not common on the English web but it is in other languages.” So the structural choice isn’t the lever people think it is; the integration is.

My position: the “wins” are usually confounded

I wrote the contrarian take on this for Ahrefs in March 2021, and I’ll restate it here because it still holds. The belief that subdirectories are SEO-superior rests on case studies that move a section from a subdomain to a subfolder and report a traffic jump. The problem is that those migrations almost never change only the URL.

When teams do these moves, they typically also:

  • Improve internal linking — the section gets properly woven into the main nav and contextual links for the first time.
  • Prune or rewrite thin contentThin content is web content that provides little or no value to users. Google's spam policies name it 'thin content with little or no added value' — and it's about value per page, not word count. as part of the migration.
  • Upgrade the CMS or platform, which often improves speed, templates, and crawlabilityCrawlability is how well search engine crawlers can discover, access, and fetch a site's pages. A crawlability issue is any technical condition — blocked access, broken links, server failures, or bloated URL inventory — that stops pages from reaching the index..
  • Fix analytics, so traffic that was always there is finally measured under one property (cross-domain/cross-host tracking gaps are common on subdomains).

Any one of those can move traffic. Attribute the whole gain to the dot-becoming-a-slash and you’ve confused correlation with causation. As I put it in the article: changes introduce risk, so think twice before changing from a subdomain to a subdirectory if the only reason you’re doing it is for SEO.

That doesn’t mean no case study isolates the structure. Pink Cake Box is the cleanest one I know of — Archive.org checks show no design or content changes accompanied the move, and organic sessions rose roughly 40%. The reverse test, IWantMyName moving subdirectory→subdomain and dropping about 47%, adds weight. I take those seriously. But they’re the exceptions that get clean measurement; the HotPads/HubSpot-style cases everyone cites had simultaneous changes, and the people who ran them (John Doherty on HotPads) have said as much. Correlation studies — the “11.8M results” and similar — are correlational by nature; sites that use subdirectories also tend to be larger and more SEO-mature.

Real technical differences (these are not myths)

Set the ranking debate aside — there are concrete operational differences, and they usually favor subdirectories for closely-related content:

  • Search ConsoleA free Google service that reports how a site performs in Google Search and surfaces problems with how Google crawls, indexes, and serves it. It's first-party data straight from Google — but you don't need it to appear in results.. A subdomain needs separate verification and its own property. (A GSC Domain property covers all subdomains at once, which softens this.) Mueller: “We do have to learn how to crawl them separately but for the most part that’s just a formality for the first few days.”
  • CrawlingCrawling is how search engines use automated bots (like Googlebot and Bingbot) to discover URLs and download pages. A page has to be crawlable to be indexed, but crawling on its own isn't a ranking factor.. With a subdirectory, GooglebotGooglebot is Google's web crawler — the software that fetches pages so Google can index and rank them. It comes in two variants, Googlebot Smartphone (primary, under mobile-first indexing) and Googlebot Desktop, and runs an evergreen Chromium renderer. already understands it’s the same server — no re-learning period. Mueller framed the subdirectory advantage as: “this helps us with crawling since we understand that everything is on the same server and can crawl it in a similar way.”
  • Analytics. One GA4 property by default; no cross-domain/host configuration to capture the section’s traffic.
  • Site names in search results. Google supports site names for domains and subdomains but not for subdirectories — a real, documented functional difference.
  • Preferred Sources / property-level tools. Some Search ConsoleGoogle's free tool for monitoring crawling, indexing, and search performance. surfaces operate at domain and subdomain level, not subdirectory level.
  • Link equity. Backlinks to a subdirectory are unambiguously under the root domain. For a subdomain, whether that equity “flows” to the root depends on whether Google treats the subdomain as part of your site — the same per-site evaluation as everything else.

When a subdomain genuinely makes sense

Subdomains aren’t a mistake. Reach for one when:

  • It’s a genuinely separate product or serviceapp.example.com, status.example.com, community.example.com.
  • You need technical separation — a different CMS, a different stack, a different team, or different infrastructure that’s far easier to run on its own hostname.
  • International targeting — Google lists subdomains (de.example.com), subdirectories (example.com/de/), and ccTLDs (example.de) as equally valid for geotargetingConfiguring a site or URL to target users in a specific country.. Subdirectories are operationally simplest; ccTLDs send the strongest geoGenerative Engine Optimization — visibility inside AI answer engines.-signal; subdomains sit in the middle.
  • Large enterprises with multiple business units, where separate GSC properties per team is a feature, not a bug.

What Bing cares about

Bing doesn’t prescribe one structure for legitimate sites. In “Some Thoughts on Website Boundaries” (Frederic Dubut and the Bing Webmaster ToolsMicrosoft's free portal for monitoring and improving how a site appears in Bing search — the peer to Google Search Console, plus IndexNow instant indexing, richer backlink data, and keyword volumes. Because Bing's index also feeds Microsoft Copilot, it doubles as a window into AI-search visibility. team, November 2019), Bing’s concern is inorganic site structure — PBNs, doorways, and subdomain/subfolder leasing, where third-party content is hung off a subdomain with minimal internal linking specifically to leak site-level signals to an unrelated party. Bing’s blunt warning: “If you offer free hosting on your subdomains and 95% of your subdomains are flagged as spam, Bing will expand penalties to the entire domain, even if the root website itself is not spam.” For a normal business using its own subdomain, none of this applies.

This connects to Google’s site reputation abuse policy update (November 2024), which is worth knowing: “Moving content to a subdirectory or subdomain within the same site’s domain name doesn’t resolve the underlying issue and may be viewed as an attempt to circumvent spam policy.” So you can’t structure your way out of a parasite-SEO problem.

The reverse-proxy workaround

If you’re technically locked into a subdomain — WordPress.com, a headless CMSA content management system that separates the content repository from the presentation layer, delivering content via API to any front-end framework rather than rendering HTML server-side itself. It doesn't specify the rendering mode, hosting, cache, preview security, or publishing workflow — those are separate decisions., or a docs/help platform you can’t self-host — you don’t have to migrate to get a subdirectory URL. You can use a reverse proxy (Cloudflare WorkersA serverless function that runs at Cloudflare's global edge, close to every user. is the common route) to serve blog.example.com as example.com/blog/ from the crawlerA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index.’s and user’s perspective. The URL everyone sees is the subdirectory path; the backend stays on the subdomain install. Cloudflare documents this pattern in a two-part Workers series. It’s a legitimate, widely-used technique — just be sure the proxied content is genuinely yours, not leased (see the abuse policies above).

Should you migrate? How to think about the risk

My decision rule:

  • Stay put if your subdomain is established, ranking, well-linked from the root, and integrated. Migrating purely for URL structureURL structure is how the parts of a web address — scheme, domain, path, query string, and fragment — are organized and formatted. It mostly affects crawling, usability, and how engines understand a page, not rankings directly. is risk with little reward.
  • Migrate when you’re doing a larger platform migration anyway, or the subdomain has real technical/performance problems — i.e., when the URL change is bundled with fixes that actually move the needle.
  • If you do migrate, fix the confounders first so you can read the result cleanly: internal linking, content quality, redirectsA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. (301s), and analytics. Then the structure change is the only variable left.
  • Follow Google’s official site-move workflow — map old URLs to new ones, redirect every one of them, update internal linksAn internal link is a hyperlink from one page on a website to another page on the same website. Internal links help search engines discover your pages and pass ranking signals (PageRank and anchor-text context) between them. and sitemapsA sitemap is a file that lists the pages, images, videos, and other files on your site so search engines can discover them. It helps discovery, but submitting a sitemap doesn't guarantee crawling or indexing., verify the new property in Search Console, and then monitor a representative set of URLs rather than assuming the move went cleanly.
TIP Find legacy subdomain URLs the migration map missed

Unmatched URLs, weak matches, many-to-one mappings, chains, and sitemap removals are migration defects to resolve before launch. The tool does not decide whether the subdomain move itself is worthwhile.

Review the URL map with my free SEO Migration Planner & Validator Free

  1. Supply the legacy subdomain inventory and proposed subdirectory destinations.
  2. Resolve unmatched, weak, many-to-one, chained, and sitemap-only mappings before release.
  3. Crawl the staged map, launch only after approval, then monitor representative URLs and indexation during processing.
A structural preference is not a migration plan; every valuable legacy URL still needs an approved final destination.

The review table maps old.example.com/products/widget-a exactly to new.example.com/products/widget-a and marks it accept. The retired-campaign URL has no safe match and remains todo.

Expect 2–4 weeks of fluctuation as Google processes redirects, with recovery typically inside 4–6 weeks when the migration is done correctly.

Where this fits

This is one piece of how you organize a site — siblings in this cluster cover URL structure conventions, site architectureSite architecture is how a website's pages are organized, categorized, and interlinked. It controls how crawlers discover pages, how link equity flows, and how clearly search engines understand each page's topical context. Silo structure, hub and spoke, and topic clusters are the three common models. and crawl depthCrawl depth usually means click depth — how many clicks it takes to reach a page from the homepage by following internal links. It can also mean a crawler setting that limits how many levels deep a crawl goes before it stops., and faceted navigationFaceted navigation (faceted search, product filtering) lets visitors refine a list of products or content by attribute — price, color, size, brand, rating. The SEO problem: each filter combination can spawn a distinct crawlable URL, turning a small catalog into millions of near-duplicate pages that waste crawl budget and dilute ranking signals., and the international angle overlaps with hreflangHreflang is an annotation (in HTML, HTTP headers, or XML sitemaps) that tells search engines which language and optional region a page targets, and which alternate versions exist. It only works when every page in the cluster references all the others. and ccTLD decisions in international SEOInternational SEO is the practice of optimizing a site so search engines understand which countries and/or languages it targets, and serve the right version to each user. It spans URL structure, hreflang, and on-page localization.. The throughline is the same: structure is a way to organize and manage content, not a ranking lever in its own right.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.