Subdomains vs subdirectories for SEO: how to choose

Subdomains are not automatically bad for SEO. The better choice depends on how your site is connected, governed, measured and maintained.

Where should your blog live? Should a help centre sit at help.example.com or example.com/help/? What about an ecommerce store, an international section or a customer application?

These are often presented as SEO questions with a simple answer: use subdirectories because subdomains supposedly lose authority. That advice is too broad. Neither structure is universally better.

The more useful question is whether the section can be connected, governed, measured, crawled and maintained as part of the wider search strategy. A subdomain is not automatically harmful, and a subdirectory is not automatically well managed. The hostname is only one part of the decision.

The basic difference between a subdomain and a subdirectory

A subdirectory changes the path after the main domain:

example.com/blog/

A subdomain changes the host that appears before the main domain:

blog.example.com/

That is more than a cosmetic difference. With the same scheme and port, a subdomain is a different browser origin from the main domain. This can affect JavaScript access, browser storage, embedded applications, authentication and requests between the two parts of the site. The browser same-origin model explains this technical boundary.

Search engines can crawl and index pages on both structures. Google’s SEO Starter Guide does not say that subdirectories are always better. It notes that subdirectories may be easier to manage in some cases, while subdomains can make sense for separating topics depending on the site and industry.

Google also generally treats a root domain and its subdomains as one site for site-diversity purposes. That does not mean every Google system treats them identically for crawling, reporting, indexing or ranking. It does mean that describing every subdomain as a completely separate website is inaccurate.

What the hostname changes directly

There are direct technical differences, but they need to be kept in proportion.

  • Crawl access: each host can have different server behaviour, robots.txt rules, sitemap configuration, redirects and authentication requirements.
  • URL signals: canonicals, redirects, internal links and sitemap inclusion need to point clearly towards the URLs you want search engines to understand and show. Google explains how these signals work in its guidance on consolidating duplicate URLs.
  • International signals: subdomains and subdirectories can both be used for localised versions. The URL pattern alone does not tell Google which language or region a page targets. Where relevant, that needs to be supported with consistent language and regional signals such as hreflang annotations and links.
  • Measurement: Search Console can provide a domain-wide view across a domain and its subdomains, while URL-prefix properties can isolate a host, protocol or path. Google describes these options in its Search Console property guidance.

None of these points proves that one URL structure ranks better. They show where implementation needs to be deliberate.

The bigger issue is usually operational separation

A subdomain often comes with a separate platform, team or release process. That separation may be entirely sensible. It can also create more opportunities for the wider search experience to become disconnected.

For example, a subdomain may have:

  • different navigation from the main site;
  • separate developers or suppliers;
  • its own content approval process;
  • different deployment schedules;
  • separate analytics configuration;
  • its own robots.txt and XML sitemap decisions;
  • different authentication, cookie or consent behaviour; and
  • no clear owner responsible for how the section supports organic search.

This is an architectural inference from the boundaries involved, not a ranking penalty. A separate host creates more opportunities for missing links, inconsistent signals and maintenance gaps. A subdirectory can suffer from the same problems, although a shared CMS and release process may make them easier to spot and fix.

Google says that crawlable links help discovery and understanding, while sitemaps provide useful discovery information without guaranteeing that pages will be crawled or indexed. In practice, the connection between sections matters more than the hostname alone.

Scenario 1: a company blog or content hub

Imagine a software company deciding between example.com/blog/ and blog.example.com/.

A subdirectory is often the simpler choice when the blog uses the same CMS, templates, analytics, navigation and publishing team as the main marketing site. New articles can link naturally to product pages, use shared components and go through the same release checks.

A subdomain may still be reasonable if the blog runs on a separate publishing platform or has a genuinely different editorial operation. The risk is not that Google sees the hostname and refuses to rank it. The risk is that the content hub becomes a disconnected island: articles are poorly linked to the main site, product teams do not know which topics matter and nobody checks whether important pages remain discoverable.

Before choosing, ask whether the blog is meant to support the main site’s commercial journey or operate as a separate publication. If it is the former, a shared structure may reduce friction. If it is the latter, a subdomain may reflect the operating model more honestly, provided the relationship remains clear to users and search engines.

Scenario 2: an ecommerce store

Now consider a retailer with a marketing site at example.com and a store at shop.example.com.

If the store contains the category and product pages that need to generate organic demand, separation deserves close attention. Customers may arrive on a product page from search and then need to move between buying information, delivery details, support content and the wider brand site. Cross-section links, navigation, canonicals, sitemaps and analytics should all support that journey.

A subdomain can rank. It does not automatically lose authority. A store on a separate commerce platform may nevertheless have different URL rules, a separate release team and limited control over templates. Those practical constraints can affect the quality of links, metadata, indexation controls and measurement.

A subdirectory may be easier when the store and content site share infrastructure and ownership. It is not automatically better if the implementation is fragile or if forcing the store into the main platform creates poor URLs, slow releases or unreliable technical controls. The decision should follow the platform and operating reality, rather than a slogan about authority.

Scenario 3: an international section

A business expanding into Germany might choose de.example.com/, example.com/de/ or a separate country domain.

Google supports these broad patterns for localised content. The important point is that the hostname or folder does not, by itself, establish the intended market. Pages need appropriate language and regional signals, links between relevant equivalents and a consistent approach to canonicalisation.

For example, if the German section is on a subdomain, check that:

  • the German pages link to the right German and global pages;
  • hreflang annotations are reciprocal and use the correct URLs;
  • canonical tags do not point accidentally to English equivalents;
  • the subdomain is included in the right XML sitemaps; and
  • the local team can maintain the templates and translations after launch.

A subdirectory may simplify shared templates and governance. A subdomain may make sense when a local business has a separate platform, legal setup or team. Neither choice removes the need for proper international implementation.

Scenario 4: a help centre or customer application

Help centres sit somewhere in between. Some are a core acquisition channel, while others mainly serve existing customers.

If the help centre contains public troubleshooting and comparison content that should attract new users, it needs deliberate links, crawl access, indexation decisions and measurement. A subdirectory may make shared navigation and publishing simpler, but a subdomain can work well when the help centre runs on a specialist platform.

An application or login area is a clearer example of legitimate separation. A customer portal at app.example.com may need separate authentication, infrastructure, security controls and deployment ownership. Many logged-in URLs may not need to rank at all. In that situation, using a subdomain can be the sensible operational choice.

The public pages around the application are different. Product landing pages, documentation and onboarding content may still need to be crawlable and visible in search. Keeping the application separate does not mean every related URL should be hidden or every public page should be placed there without a plan.

How to check an existing setup

Before deciding that a subdomain is the problem, inspect how the sections actually work together.

  1. Check cross-section links. Can users and search engines move between the main site and the separate section through useful, crawlable links?
  2. Check crawl access. Review robots.txt, server responses, authentication barriers, redirects and whether important pages can be reached without relying only on a sitemap.
  3. Check XML sitemaps. Confirm that the relevant host or path has accurate sitemaps containing the URLs you want discovered, without a large volume of redirected, canonicalised or blocked URLs.
  4. Check canonicals and duplicates. Look for overlapping pages across hosts, inconsistent canonical tags and multiple URL versions that compete to represent the same content.
  5. Check international signals where relevant. Validate hreflang, language targeting and canonical relationships rather than assuming the folder or subdomain makes the decision for you.
  6. Check analytics attribution. Subdomains can be measured in the same Google Analytics property, but inconsistent tagging or cookie configuration can cause self-referrals, fragmented sessions or misleading journeys. Google documents the relevant cross-domain measurement setup.
  7. Check ownership and releases. Who approves changes? Who owns SEO requirements? Can one team change templates, navigation or redirects without another team knowing?
  8. Check Search Console coverage. Use a domain property for the wider view and more focused properties where separate teams need to monitor a section.

The aim is not to produce a huge audit for its own sake. It is to find out whether the structure is helping the business operate safely or quietly creating avoidable gaps.

A practical decision checklist

A subdirectory is often a good fit when most of the following are true:

  • the section serves the same broad search purpose as the main site;
  • it shares the CMS, templates, navigation and analytics;
  • the same team owns content, development and technical SEO;
  • releases can be tested across the wider site; and
  • there is no strong security, platform or product boundary requiring separation.

A subdomain may be the better fit when several of these conditions apply:

  • the section is a genuinely separate product, application or platform;
  • authentication, security or infrastructure needs create a real technical boundary;
  • different teams or markets need independent deployment and ownership;
  • the section has a distinct purpose and audience; or
  • many of its URLs do not need to rank, as with a private application area.

Before committing, estimate the cost of changing an established structure. A move from blog.example.com to example.com/blog/ is not a harmless folder rename. It changes URLs and should be treated as a migration, with URL mapping, redirects, updated internal links, canonical and sitemap changes, tracking validation and post-launch monitoring. Google’s guidance on site moves with URL changes explains why search engines need to recrawl and reassess the new addresses.

If the current subdomain is working, well connected and properly governed, a migration needs a stronger reason than the hope that subdirectories will improve rankings. Conversely, if the section is difficult to measure, poorly linked and controlled by several teams, changing the structure may be one possible remedy, but it will not fix weak ownership on its own.

The decision is about the operating model

Subdomains are not inherently bad for SEO, and subdirectories are not a universal cure. Search engines can work with both. The practical difference is often the number and quality of boundaries around the section: platform, team, ownership, navigation, measurement, release process and technical maintenance.

Choose the structure your business can connect, govern and validate reliably. For a shared blog or store, that may be a subdirectory. For an application or genuinely separate product, a subdomain may be the cleaner and safer choice.

The useful test is whether the chosen structure works consistently in the conditions that matter: useful links, reliable crawl access, clear canonical and international signals, trustworthy measurement and accountable ownership.

For related thinking, see our guide to organisation and website schema and our discussion of the risks involved in moving to a new domain.

Share this article

Found this useful? Pass it on.

Share on LinkedIn · Share on X