Technical SEO

Subdomain vs subdirectory for SEO: what Google actually says

Most advice on this question mixes Google's words with one agency's anecdote. We kept them apart. Below: what Google's documentation says, what it leaves open, a decision table for common situations, and how to serve a subdomain on a subfolder path when your platform forces a subdomain.

By Adem ÇakalPublished 5 sources6 min read
Short answer

Google's documentation presents subdomains and subdirectories as two valid structures and does not say either ranks better. Choose the subfolder (example.com/guides/) when you control the main site, because it keeps one host, one set of internal links and simpler maintenance. Choose a subdomain (guides.example.com) when a separate platform or team runs that section and a proxy is not available.

What Google has documented

We limited this page to Google Search Central and Search Console Help. The table separates a documented statement from the inference we draw from it.

SourceWhat it saysWhat it does not say
Multi-regional sites guideLists subdomains and subdirectories as options. Subdomains: easy to set up, simple separation of sites. Subdirectories: easy and low maintenance because they share one host, but separating sites is harderIt is written for country and language targeting. It makes no ranking comparison
URL structure guideAdvice on readable, consistent URLs, parameters and case. Mentions a country subdirectory as an exampleDoes not discuss subdomains at all
Search Console property helpA Domain property includes all subdomains, protocols and subpaths. A URL-prefix property excludes subdomains such as m.example.comSays nothing about ranking. It is a reporting rule

Two things we could not verify from a primary source: a Google video or transcript stating that either structure is fine for ranking, and any controlled case study with a stated method. Industry write-ups report traffic changes after migrations, but each is one site, usually with other changes made at the same time. We do not cite them as evidence.

What the choice changes in practice

Subfolder keeps content on the main host; subdomain creates a second host Subfolder example.com/ example.com/pricing example.com/guides/topic one host, one robots.txt Subdomain example.com/ example.com/pricing guides.example.com/topic second host, its own robots.txt and sitemap
A subdomain is a separate host. Crawl rules, sitemaps and verification are handled per host.

These consequences follow from how hosts work, and from Google's own tools:

  • robots.txt is per host. A subdomain needs its own file, and so does its sitemap. See the sitemap checker.
  • Reporting depends on property type. With a Domain property you see both hosts together. With a URL-prefix property you need one property per host.
  • Internal linking is ours to design. This one is our judgment, not a Google statement: a section on the same host is usually linked from the main navigation and templates without extra work, while a separate host often gets a sparse link from the main site.

Decision table by situation

SituationOur pickWhy
Company blogSubfolderSame CMS or framework can serve it, and the blog links to product pages directly
DocsSubfolder if possible, subdomain if the docs tool requires itDocs platforms often run on their own host. Add navigation links both ways
Help centerSubdomain is common and acceptableUsually a hosted support product, and rarely the page you rank for with commercial intent
Logged-in appSubdomain (app.)Different codebase, mostly noindexed. Keep marketing pages on the main host
InternationalEither; Google lists bothGoogle's pros and cons concern server location and ease of separation
Hosted platform that cannot serve a subfolderSubdomain, or a reverse proxySee the next section

Our own case at SiteTiller

We publish guides to a guides. subdomain on platforms where we have no write API into the main site. We say plainly that a subfolder is the better result where it is possible: one host, templates shared with the rest of the site, and one set of internal links. The subdomain is the practical option when the alternative is publishing nothing. For a site we can reach, a proxy path gives the subfolder without migrating the content.

Serving a subdomain from a subfolder

A reverse proxy answers requests for /guides/ on the main host by fetching the content from the subdomain. Visitors and crawlers only see example.com/guides/. On Cloudflare, create two Worker routes, example.com/guides and example.com/guides/*; per Cloudflare's docs a trailing * matches the path and its suffixes, and the domain needs a proxied DNS record.

export default {
  async fetch(request) {
    const url = new URL(request.url);
    url.hostname = "guides.example.com";
    url.pathname = url.pathname.replace(/^\/guides/, "") || "/";
    return fetch(new Request(url, request));
  },
};

On Next.js, the same idea is a rewrite to an external URL, in the form shown on nextjs.org:

module.exports = {
  async rewrites() {
    return [
      { source: "/guides", destination: "https://guides.example.com/" },
      { source: "/guides/:path*", destination: "https://guides.example.com/:path*" },
    ];
  },
};

Both snippets are starting points. The Worker is our sketch built from Cloudflare's documented handler and route rules; we have not run it against every platform. The proxied pages must also emit canonical URLs, internal links and sitemap entries on the /guides/ path, or Google will still see the subdomain. See noindex vs robots.txt vs canonical for the canonical side.

Questions people ask

Does Google rank subdomains lower than subdirectories?

We found no statement in Google Search Central documentation that ranks one above the other. Google's multi-regional guide lists pros and cons for both and prefers neither. Other sources report Google staff saying either works; we could not open a primary recording, so we do not quote it.

Does Search Console report on subdomains?

Yes, with the right property type. A Domain property aggregates all subdomains, protocols and subpaths. A URL-prefix property does not include subdomains such as m.example.com.

Can I move a subdomain to a subfolder later?

You can, but every URL changes, so it needs 301 redirects and a fresh sitemap. Pick the structure you can keep. A reverse proxy avoids the move because the public URL stays on the subfolder from day one.

Is a reverse proxy risky for SEO?

It adds a moving part. If the proxy fails, the path returns errors, and the proxied pages must emit canonical URLs and links on the public path. Test with a URL inspection before relying on it.

Sources

  1. Google Search Central: Managing multi-regional and multilingual sites, accessed 2026-11-12.
  2. Search Console Help: Add a website property (Domain vs URL-prefix), accessed 2026-11-12.
  3. Google Search Central: URL structure best practices, accessed 2026-11-12.
  4. Next.js docs: rewrites (external URLs), accessed 2026-11-12.
  5. Cloudflare Workers docs: Routes, accessed 2026-11-12.