Subdomain vs. Subfolder – Which Is Better for SEO?

Using a subdomain or subfolder influences the SEO part, the user experience and other factors, but the question is: subdomain vs. subfolder – which is better for SEO? Let’s find out!

Google classifies subdomains more or less in the same way as subdirectories (also called subfolders).

There is a major difference, namely that the subdomains are considered independent and distinct sites from the main domain.

It is important to consider the practical impact on your SEO before choosing to place content in a subdomain or subdirectory.

The short answer, before the detail

If you only take one rule away from this article, take this one: the subfolder is the safe default, and the subdomain is the deliberate exception. You should be able to justify a subdomain with a technical or organizational reason, not with a vague hope that it will rank better.

  • Use a subfolder when the content belongs to the same site in the mind of the visitor, when it is on the same topic, and when it can live on the same hosting stack. Blogs, resource hubs, service pages, location pages and glossaries almost always belong in subfolders.
  • Use a subdomain when the section is genuinely a different product or a different system: a logged-in application, a status page, a documentation portal hosted by a vendor you cannot reverse proxy, a staging environment, or user-generated content you want to keep at arm’s length from your main brand.
  • Never choose based on a promise of “more authority”. Neither structure is a ranking factor on its own. What changes is how easily the section inherits crawling, internal linking and reputation from everything else you have already built.

The difference between a subdomain and a subdirectory

What is a subdirectory?

A website usually consists of different sections and web pages.

In the old days of HTML coding, a web designer created folders and put web pages in those folders.

That is why they are now called “subfolders” or “subdirectories”.

This is very similar to how file storage works on a computer desktop. On the desktop you can create folders and put images or calculation files in each, same with webpages.

Like desktop folders, online folders have names like / car images /. All HTML pages with car images are stored there.

When navigating to those pages, you are practically navigating to a folder and a real HTML file:

example of subdirectories or subfolders for a domain
https://www.examplecarsite.com/car/car-images/

Those folders, / car / and / car-images / are called subdirectories or subfolders.

In WordPress sites and other PHP-based websites, these subdirectories are virtual.

They do not exist on the server, where you could navigate to them with an FTP program, so you can see the real folders.

Although they are virtual, they are still part of the website’s file structure and are still called subdirectories.

A subdirectory is a part of the structure of the website, associated with the domain name.

What is a subdomain?

A subdomain is very different from a subdirectory; it’s like a completely different site.The subdomain is associated with the domain, but not with the website associated with the domain name.

A subdomain is generally considered an independent site, derived from the main domain.

This is an example of a subdomain:

help.examplecarsite.com

This is an example subdomain that contains a subdirectory:

help.examplecarsite.com/contact/

What actually changes at the DNS and server level

The difference is not only conceptual. It exists in the plumbing, and that is usually what decides the argument in a real project:

  • A subdomain is a DNS entry. You add an A, AAAA or CNAME record in the DNS zone of your domain, and it can resolve to a completely different server, a different hosting company or a different CDN. Nothing has to be shared with the main site except the name.
  • A subfolder is a path handled by one web server. The request arrives at the same origin, and the same application decides what to return. If you want a different application to answer on that path, you need a reverse proxy or an edge worker in front of it.
  • Browsers treat them as different origins. help.example.com and www.example.com/help/ are separate origins under the same-origin policy. Local storage, service workers and CORS rules are separate, and field performance data is collected per origin, so the subdomain gets its own Core Web Vitals bucket.
  • Cookies follow the registrable domain, not the host. A cookie scoped to .example.com is readable on every subdomain of example.com, which is why a login session can be shared between the main site and an app subdomain. Where a “registrable domain” ends is defined by the Public Suffix List.
  • TLS certificates are per host. A certificate for example.com and www.example.com does not automatically cover help.example.com; you need a wildcard or an additional SAN entry. A subfolder needs nothing extra.

Google considers subdomains to be separate independent sites

Google has always considered subdomains to be as different sites, separate from the main domain.

This is evident in the Google Search Console, where subdomains must be verified separately from the content that exists on the main domain’s website.

John Mueller of Google explained this in a video for webmasters:

“You will need to check the subdomains separately in the Search Console, change the settings, and track overall subdomain performance.

We have to learn how to access them separately, but for the most part this is just a formality for the first few days. “

Two practical consequences follow from that separation. First, a subdomain has to earn crawl attention on its own: it is discovered mainly through links from the main site, so if you launch one and link to it from a footer only, expect a slow start. Second, robots.txt is per host. example.com/robots.txt does not govern help.example.com, which needs its own file at help.example.com/robots.txt. This catches teams out constantly, especially when a staging subdomain is left indexable. Google’s introduction to robots.txt spells out the host scoping.

The same applies to sitemaps. A sitemap can only list URLs from the host it is served on, unless you cross-submit it and prove ownership of both hosts, so a subdomain normally needs its own sitemap file, referenced from its own robots.txt. Google documents the rules in its guide on building and submitting a sitemap.

Subdomain vs. subfolder at a glance

FactorSubdomain (help.example.com)Subfolder (example.com/help/)
Search ConsoleNeeds its own URL-prefix property, or a Domain property that covers every hostIncluded in the existing property automatically
robots.txt and sitemapsSeparate files per hostShared with the rest of the site
Internal linkingLinks from the main site are cross-host links, so the section starts colder, without shared navigation or breadcrumbsInherits internal link paths, breadcrumbs and navigation from day one
Hosting flexibilityAny stack, any provider, any CDNSame origin, so a different stack needs a reverse proxy
TLS certificateWildcard or extra SAN entry requiredCovered by the existing certificate
Cookies and sessionsShareable if scoped to the registrable domainShared by default
Core Web Vitals field dataCollected as a separate originAggregated with the rest of the site
Cost of changing your mind laterHigh: moving to a subfolder is a full site moveLow: usually a path change and redirects
Typical fitApp, account area, status page, vendor-hosted docs, staging, communityBlog, resources, services, locations, case studies, glossary

When is a subdomain used?

There are technical, branding and SEO implications that underlie the reasons why a publisher would choose to host certain content in a subdomain.

The recurring, defensible cases look like this:

  • The logged-in product. An application on app.example.com keeps the marketing site and the product on separate deploy cycles, so a release cannot take the homepage down with it.
  • A status page. Deliberately hosted elsewhere so it stays up when the main infrastructure does not. Putting it in a subfolder would defeat its purpose.
  • Vendor-hosted systems you cannot proxy. Some help-desk, community, job board or e-learning platforms only offer a CNAME setup. A subdomain is then the honest choice.
  • Staging and development. Always behind HTTP authentication and blocked from indexing, never merely “noindexed and hoped for the best”.
  • User-generated content at scale. If visitors can publish, isolating it limits the damage a spam wave can do to your primary host.

SEO reasons for using subdomains

There may also be SEO reasons in favor of hosting on a subdomain; for example, if a publisher has a content topic that is completely different from the main site.

The publisher may choose to host that section of a subdomain to isolate that content on its own website, but still be within the brand of the main site.

For example, some news sites host their recipe content in a subdomain.

I don’t know if this is done for SEO reasons, but it’s an example of separating a section of a site that has a very different topic from the rest of the site, where one section is static and relatively unchanged, and the rest of the site is in a constant state of change.

Isolation cuts both ways, and that is the part worth understanding. A separate host contains risk: if a section attracts manual actions, spam links or quality problems, the damage is more likely to stay where it is. In exchange, the section does not benefit from the reputation of the main site as directly as a subfolder would. You are trading upside for a firewall. Make that trade consciously.

The aspects of subdirectories are useful

A site that is comprehensive can be seen as having more credibility than a site that focuses only on a granular part of a topic.

This does not mean that the granular site is less credible or useful.

But a site that can cover the full scope and depth of the subject can attract more links and can be recognized as credible.

For this reason, a site may choose to use subfolders over a subdomain approach.

Another reason to use a subdirectory format is that there are overlaps between different sections.

Someone who shops online for grain may also want to buy a pair of gym pants to use while working from home.

A site that presents both articles is more useful than a site that focuses only on one or the other.

There is also a quieter operational benefit. One host means one template system, one navigation, one breadcrumb trail, one set of structured data types from schema.org, one performance budget and one analytics setup. Every subdomain you add duplicates that work, and duplicated work tends to be maintained unevenly. Six months later the subdomain is the one with the outdated cookie banner and the broken internal links.

A five-question decision framework

Instead of arguing about theory, answer these five questions about the specific section you are planning. Score one point for each “yes”.

  • 1. Would a visitor be surprised to find this on your main site? If a customer would expect the section to be part of the same website, that is a strong vote for a subfolder.
  • 2. Does it share an audience and a topic with your existing pages? Shared audience means shared internal linking opportunities, and internal links are far more useful within one host.
  • 3. Can it run on your current stack, or behind a reverse proxy you control? If yes, the technical objection to a subfolder disappears.
  • 4. Do you want its search performance reported together with the rest of the site? Combined reporting is easier to act on when the section is part of the same funnel.
  • 5. Is the failure risk of the section low? Marketing content is low risk. Open user submissions and experimental products are not.

Four or five “yes” answers point clearly at a subfolder. Zero, one or two point at a subdomain. A score of three usually means the real constraint is technical rather than editorial, so check question three again before you decide – a reverse proxy is often cheaper than a permanent split.

Worked example: three sections, three answers

Imagine a fictional B2B software company on example.com that is planning three new sections at once.

  • An editorial blog. Same audience, same topics, runs on the same CMS, low risk, and every article can link to the service pages. Five out of five, so example.com/blog/.
  • A product documentation portal on a SaaS vendor. Same audience and same topic, but the vendor supports a CNAME only. If the vendor supports path-based hosting or the team can proxy it, example.com/docs/ wins; if not, docs.example.com is a reasonable compromise rather than a failure.
  • A customer community with open posting. Different content type, moderation risk, separate platform, separate uptime profile. That is a one or two out of five, so community.example.com.

Notice that the answer changed per section, not per company. “We are a subfolder company” is not a strategy; matching each section to its constraints is.

How to move a subdomain into a subfolder without losing rankings

If you decide the content belongs in a subfolder after all, treat it as a site move with URL changes, because that is exactly what it is. Google’s guidance on a site move with URL changes is the reference document. A workable sequence looks like this:

  • 1. Inventory everything first. Crawl the subdomain, export every indexed URL from Search Console, and export the pages that actually earn clicks and links. You cannot redirect what you have not listed.
  • 2. Map one to one. Every old URL gets exactly one new URL. Resist the temptation to fold twenty pages into one hub during the move; consolidate later, as a separate change, so you can tell the two effects apart.
  • 3. Freeze the content. Do not redesign, rewrite and relocate in the same week. If rankings drop, you want one variable to investigate.
  • 4. Build the new section and keep it out of the index until launch. Password protection is safer than noindex for a staging copy.
  • 5. Ship permanent redirects. Use server-side 301 redirects from every old subdomain URL to its new subfolder URL. Avoid redirect chains: old URL to new URL, one hop.
  • 6. Keep the redirects running for years, not months. Links pointing at the old host are the reason the move is worth doing; they only pass value while the redirect exists.
  • 7. Update canonical tags, hreflang, sitemaps and internal links so that nothing still references the old host. Self-referencing canonicals should point to the new URLs, per Google’s guidance on consolidating duplicate URLs.
  • 8. Keep both Search Console properties. Do not delete the subdomain property; you need it to watch the old host drain. Add a Domain property in Search Console so you can see both at once.
  • 9. Submit updated sitemaps for both hosts and use the URL Inspection tool on a sample of high-value URLs to confirm the new versions are indexable.
  • 10. Ask for link updates where it is realistic. Partners, directories and your own social profiles can usually be updated with one email. Redirects work, but a direct link is cleaner.
  • 11. Monitor for at least three months. Expect fluctuation for a few weeks. Track impressions and clicks for the moved section as a unit, not URL by URL.

Be honest with stakeholders about the expected outcome. A well-executed move usually recovers to its previous level and then benefits from stronger internal linking. It is not a guaranteed traffic increase, and anyone promising a specific percentage is guessing.

What changes in your reporting

The measurement side is where the subdomain decision is felt every week, long after the launch is forgotten.

  • Search Console. A URL-prefix property covers one host and one protocol. A Domain property, verified through DNS, covers every subdomain and both protocols at once – which is the single easiest way to keep visibility over a multi-subdomain setup.
  • Analytics. In GA4 you can measure a subdomain in the same property without cross-domain configuration, because the registrable domain is the same. Add the hostname dimension to your reports, otherwise /pricing on two hosts collapses into one row and your numbers quietly lie to you.
  • Core Web Vitals. Field data is grouped by origin, so a subdomain is reported separately from the main site. That matters most for INP, the responsiveness metric that replaced FID in March 2024, because a slow application subdomain no longer drags the marketing site’s numbers down – and a fast marketing site no longer flatters a slow app. Google’s overview of the Core Web Vitals explains what each metric covers.
  • Third-party authority metrics. Scores such as Moz’s Domain Authority or similar vendor metrics are calculated by tool providers, not by Google. They are useful for comparison, but do not treat a change in a vendor score as evidence that Google has re-evaluated your site.

Frequently asked questions

Does Google penalize subdomains?

No. There is no penalty for using a subdomain, and plenty of large, successful sites use them. The difference is structural, not punitive: a subdomain simply starts with less inherited context and needs its own crawling, linking and reporting setup.

Is www a subdomain?

Technically yes – www.example.com is a host under example.com. In practice search engines and users treat www and non-www as the same site, provided you pick one version, redirect the other to it and use consistent canonical tags. What you must avoid is serving both without canonicalization.

How many subdomains are too many?

There is no numeric limit. The practical ceiling is how many hosts your team can maintain properly: each one needs its own certificate renewal, robots.txt, sitemap, analytics check and template updates. If you cannot name an owner for each subdomain, you already have too many.

Should country or language versions live on subdomains?

All three common patterns are acceptable to Google: country-code domains, subdomains and subfolders. Subfolders keep everything on one host and are the least work to maintain; separate country domains send the strongest geographic signal but split your effort. Whichever you choose, be consistent and implement hreflang correctly across the whole set.

Can I have a subfolder on a completely different platform?

Yes, with a reverse proxy. Your edge – Nginx, a CDN rule or an edge worker – matches the path prefix and forwards the request to the other platform, which answers under your domain. The part that most often breaks is the other platform’s internal links, canonical tags and sitemap, which must all be rendered with your path prefix rather than the vendor’s hostname. Test that before you commit.

Will moving my blog into a subfolder increase traffic?

It can help, because the content becomes easier to link internally and inherits the crawl patterns of an established host. But it is not automatic and the size of the effect depends on your specific site. Plan the move for structural reasons, execute it cleanly, and treat any uplift as a bonus rather than a forecast.

Subfolder or subdomain? Choose what works best

The most important thing to use in a subdomain is whether it works for users.

Even so, the SEO, branding and technical advantages of each must be taken into account.

In general, if it makes sense for users for a section to belong to the site, then using a subdirectory structure is the best way to structure a website.

But if the section is better as a standalone site because it is so different from the rest of the site and you want it to continue to be associated with the brand or name of the main site, then a subdomain might be the best approach for you.

Sometimes, there is simply no definitive answer as to which of the two is the best. However, taking all these factors into account, the choice becomes easier to make.

And if you are still undecided, apply the cheapest tie-breaker there is: choose the option you would find easier to undo. Nine times out of ten, that is the subfolder.

Free backlink audit

Want links like the ones in this playbook?

Get a free, same-day audit of your backlink profile — 3 quick wins and exact pricing, no obligations.

Get my free audit →

Leave a Comment

EN|DE|RO