Subdomain versus subdirectory is an architecture choice that separates content by hostname or path; neither structure has a universal ranking advantage.
Meaning and scope
A subdomain places content on a separate hostname, such as docs.example.com; a subdirectory places it under the main hostname, such as example.com/docs/. The choice changes ownership boundaries, deployment, navigation, analytics setup, cookie scope and migration work. Google has not published a universal ranking winner, so the decision should follow the product and operational model rather than a folklore rule.
How to inspect it
Map real boundaries: who owns the content, whether it shares a search audience and brand, how navigation connects it, and what will happen to URLs over time. Crawl both areas as visitors and bots see them. Check canonical URLs, internal links, sitemaps, robots policies, language mapping and measurement separately before interpreting any visibility difference as a hostname effect.
- Choose one structure from the content’s ownership, audience, technical lifecycle and migration cost.
- Use consistent public navigation so users can move between related sections without a confusing context switch.
- Maintain each hostname or path’s canonical, robots and sitemap policy deliberately.
- If moving, map every old URL to one relevant final URL and test chains, loops and rendered navigation.
- Keep reporting segmented enough to distinguish a site move from an actual content or demand change.
Practical decisions
A subdomain can be sensible for a separately operated application, documentation system or regionally distinct property. A subdirectory can simplify shared templates and navigation for one cohesive site. Neither removes the need for a clear internal architecture. Make the boundary legible to users first, then document it so future teams do not create duplicate routes.
Limits and mistakes
Do not migrate solely for an assumed ranking boost. A hostname move is a real migration with redirect, analytics, link and cache risk. Do not infer that two sections must compete or share ranking signals in a simple fixed way; evaluate the concrete URLs, links and audience.