Subdomain or Subfolder: Which Is Better for SEO?

Is a subdomain good for SEO? Google can rank both, but subdomains run as separate hosts. The real trade-offs, a decision checklist and how to move safely.

By the MakeItFlow team Updated 12 min read
Share LinkedIn X Facebook WhatsApp
Subdomain or Subfolder: Which Is Better for SEO?

Short answer: a subdomain can rank as well as a subfolder. Google's documentation lists both as acceptable ways to structure a site and has not published any rule that ranks one above the other. The difference is practical. Google handles a subdomain such as blog.example.com as a separate host for some purposes: it has its own robots.txt, needs its own URL-prefix property in Search Console (unless you use a Domain property), and can be treated as its own site in features such as site names. A subfolder such as example.com/blog/ simply inherits the main site's setup.

For most small businesses that makes a subfolder the simpler choice. It keeps one technical setup, one set of internal links and one place where links, content and reporting come together. Choose a subdomain when the section is technically or editorially separate, such as a hosted help centre, booking system or app.

The rest of this guide explains what Google actually says, gives you a decision checklist, covers how to set up a subdomain for SEO if you need one, and shows how to move from one structure to the other without losing traffic.

Key takeaways

  • For most small businesses a subfolder is the simpler and safer choice, although Google says it can rank content well on either structure.
  • Choose a subdomain when a section is genuinely separate, such as a hosted help centre, booking system, status page or customer portal.
  • Robots.txt applies only to the host it is served from, so each subdomain needs its own file and its own audit.
  • When moving a subdomain to a subfolder, map every URL one to one and keep permanent 301 redirects from the old URLs in place.

Is a subdomain good for SEO?

A subdomain is not bad for SEO in itself. Google has not published any rule that ranks subdomain content lower than subfolder content, and its international guidance lists subdomains as one acceptable way to structure a site. What makes an SEO subdomain succeed or struggle is practical:

  • It is set up as its own host. It needs its own robots.txt, its own sitemap and its own checks, so it is easy to leave half-configured.
  • It has to be linked into the main site. A subdomain that is only reachable from one footer link gets little internal linking and is harder for crawlers and visitors to find.
  • It is often run by a different team or platform. That is where outdated templates, duplicate content and broken redirects tend to creep in.

So the honest answer to "is a subdomain good for SEO" is: it can rank perfectly well if you treat it as a real part of your site, but it takes more work than a subfolder to get the same result.

What is the difference between a subdomain and a subfolder?

A subdomain sits in front of your domain name: blog.example.com or shop.example.com. Technically it is a separate hostname with its own DNS record, and it can live on a completely different server or platform.

A subfolder (or subdirectory) sits after your domain: example.com/blog/. It is part of the same hostname and is normally served by the same website.

Subdomain Subfolder
Example blog.example.com example.com/blog/
DNS Needs its own record None extra
Hosting Can be a different platform or server Same site, or a reverse proxy
Search Console Covered by a Domain property; separate URL-prefix property otherwise Same property
robots.txt Its own file at blog.example.com/robots.txt Shares the main site's file
Internal linking Links between sections cross hosts Naturally joined up
Analytics and cookies Needs cross-subdomain configuration Works out of the box
Set-up effort Easy with SaaS tools Easy on one CMS, harder with separate platforms

Does Google treat subdomains as separate websites?

Partly. Google has said for years that its systems can work with either structure, and its documentation for international sites lists both subdomains and subdirectories as acceptable options, each with pros and cons. But some things genuinely are per-host:

  • robots.txt applies only to the host it is served from. A Disallow on your main site does nothing for shop.example.com.
  • Search Console URL-prefix properties are per host, although a Domain property covers all subdomains.
  • Sitemaps normally list URLs on the same host unless you set up cross-site submission.
  • Site names in Google's results can be set for a domain or a subdomain, but not for a subfolder, according to Google's site names documentation. That is a clear sign Google can see a subdomain as its own site.
  • Google's quality systems may look at sections differently when content, design and ownership clearly differ.

So it is not true that subdomains "get no benefit" from the main site, and it is not true that the choice makes no difference. The practical differences come from how the sections are run, linked and maintained.

Why do SEOs usually recommend subfolders?

The usual argument is that a subfolder builds on the main site's links and reputation automatically. Google has not confirmed a simple "authority passes to subfolders but not subdomains" rule, and you should be wary of anyone who presents it as fact. The stronger, practical reasons are:

  1. Internal links are easier. Navigation, breadcrumbs and in-content links join the blog and product pages naturally. Our internal linking strategy guide explains why that matters.
  2. One technical setup. One robots.txt, one sitemap index, one SSL certificate, one set of security headers.
  3. One analytics view. No cross-domain tracking, so conversions from blog visitors are visible.
  4. Fewer things to forget. Subdomains often run on a different platform that nobody remembers to update, audit or redirect.

When is a subdomain the right choice?

A subdomain is the right call when the section is genuinely separate:

  • A different platform you cannot proxy, such as a hosted help centre, a booking system, a status page or a customer portal.
  • A different audience or purpose, such as a staff intranet, a careers site run by an HR platform, or a developer documentation site.
  • Separate markets where you deliberately want distinct sites, although subfolders (/fr/, /de/) with hreflang are also common.
  • Security isolation, for example user-generated content or apps you want separated from your main site's cookies.

In these cases, chasing a subfolder can cost more in engineering than it would ever return in search traffic.

Subdomain or subfolder: a decision checklist

Answer these questions about the section you're planning. If most answers point the same way, you have your structure.

Question If yes, lean towards
Does the section run on the same CMS or platform as your main site? Subfolder
Is it content you want to support your main site's topics, such as a blog, guides or service pages? Subfolder
Do you want one robots.txt, one sitemap index and one analytics setup to maintain? Subfolder
Will the same team write, edit and maintain it? Subfolder
Is it a hosted platform you can't place under a subfolder, even with a reverse proxy? Subdomain
Is it a separate product, app, customer portal, status page or help centre? Subdomain
Does it need separate cookies or security isolation, for example user-generated content? Subdomain
Is it run by a different team or vendor with its own release cycle? Subdomain
Do you deliberately want it to appear as a distinct site with its own name in search results? Subdomain

Whichever you choose, check these before launch:

  1. The section is verified in Search Console, ideally through a Domain property that covers every subdomain. Our Search Console beginner's guide explains the property types.
  2. robots.txt, the XML sitemap and canonical tags are correct on the host the section is actually served from.
  3. The main site links to the section from navigation and relevant pages, and the section links back.
  4. Branding, HTTPS and analytics are consistent across both.
  5. If you're moving an existing section, every old URL has a one-to-one 301 redirect, checked with the redirect checker.

How to set up a subdomain for SEO

If a subdomain is the right choice, set it up so search engines can crawl, understand and connect it to your main site:

  1. Verify it in Search Console. A Domain property "includes all subdomains" and needs DNS verification, so one property covers www, blog and shop together. Add a URL-prefix property for the subdomain too if you want its reports on their own.
  2. Publish a robots.txt on the subdomain at https://blog.example.com/robots.txt. Rules on your main host do not apply to it.
  3. Give it an XML sitemap and submit it. Our XML sitemap guide covers the format.
  4. Use self-referencing canonical tags that point at the subdomain URLs, not at the platform's own hostname.
  5. Link to it from the main site in navigation and in relevant content, and link back from the subdomain to your key pages.
  6. Cover it with HTTPS using its own or a wildcard certificate, and redirect http:// to https://.
  7. Keep branding and quality consistent so visitors can tell it is the same business.
  8. Audit it separately. Run checks on the subdomain hostname as well as the main domain, because problems on one do not show up in checks of the other.

Can I use a subfolder if my blog runs on a different platform?

Yes, with a reverse proxy. Your web server or CDN forwards requests for /blog/ to the other platform and serves the response under your main domain:

location /blog/ {
    proxy_pass https://yourblog.platform-host.com/;
    proxy_set_header Host yourblog.platform-host.com;
    proxy_ssl_server_name on;
}

This works, but the blog platform must support it: links, canonicals, sitemaps and assets must all use your main domain, not the platform's. Test thoroughly before relying on it, and check canonical tags carefully. Our canonical tags guide shows what to look for.

How do I move a subdomain to a subfolder without losing rankings?

  1. List every URL on the subdomain using a crawl, your sitemap and Search Console's pages report.
  2. Map each old URL to its new subfolder URL, one to one. Keep slugs the same where you can.
  3. Publish the content in the subfolder, with self-referencing canonical tags.
  4. Add permanent 301 redirects from every old URL to its new one:
# On the subdomain's server (.htaccess)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^blog\.example\.co\.uk$ [NC]
RewriteRule ^(.*)$ https://example.com/blog/$1 [R=301,L]
  1. Update internal links to point directly at the new URLs, not through redirects. See broken links and redirect chains.
  2. Update the sitemap and submit it in Search Console. Our XML sitemap guide covers the format.
  3. Keep the redirects permanently and monitor traffic and indexing for a few months. Some fluctuation in the first weeks is normal.

Frequently asked questions

Is a subdomain or a subfolder better for SEO?

Neither is better in Google's ranking systems by rule. Google says it can work with both. In practice a subfolder is easier to manage and link, so it's the default for blogs, guides and service content. A subdomain is the better fit when the section runs on a separate platform or serves a separate purpose.

Does Google treat a subdomain as a separate site?

For some purposes, yes. Each subdomain has its own robots.txt, needs its own URL-prefix property in Search Console unless you use a Domain property, and can have its own site name in search results. For ranking, Google hasn't published a rule that penalises or favours subdomains, so how well one performs depends on its content, links and upkeep.

Is a subdomain bad for SEO?

No. Google can rank content on a subdomain, and many large sites use them. Subdomains underperform when they are thinly linked from the main site, left with missing robots.txt files or sitemaps, or filled with duplicate or low-quality content. Set one up and maintain it like the rest of your site.

Do subdomains share SEO value with the main domain?

Google has not confirmed a simple rule either way, so be careful with confident claims. What you control is linking: link between the subdomain and the main site where it helps visitors, keep branding consistent and use one Search Console Domain property to monitor both.

Is www a subdomain?

Technically yes, www is a subdomain. Google treats www.example.com and example.com as different hostnames, which is why you should pick one, redirect the other with a 301, and use consistent canonical tags.

Do subdomains need their own SSL certificate?

They need to be covered by a certificate, either their own or a wildcard certificate such as *.example.com. Most hosts issue free certificates for subdomains automatically. The MakeItFlow SSL checker confirms coverage.

Will a subdomain hurt my main site's rankings?

Not by existing. Problems arise if the subdomain has thin, duplicate or spammy content, or if it is neglected and hacked. Keep it maintained and noindex sections that should not be in search, such as login pages.

Should I use a subfolder or a separate country domain for other countries?

It depends on resources. A country-code domain sends the clearest signal for one country but means more sites to run. Subfolders like /ie/ or /fr/ with hreflang are easier to maintain. Google's international guidance compares all three, and our hreflang tags guide covers how to link the language versions.

Do I need a separate robots.txt for each subdomain?

Yes. Crawlers fetch robots.txt from each hostname separately. If a subdomain has no robots.txt, crawlers assume everything is allowed. Our robots.txt guide explains the rules.

What to do next

If you already have subdomains, make sure each one is audited, redirected properly and not forgotten. MakeItFlow can crawl a whole site on paid plans with its site crawl, and a single SEO audit checks canonicals, robots.txt, sitemaps and noindex tags on any hostname you enter. Run it on your main domain and each subdomain separately.

Sources

#subdomain vs subdirectory #seo #site structure #uk #subfolder #technical seo

More guides for your industry

Free checklist (PDF)

Free software & saas website checklist

31 practical checks for software & saas: website speed and mobile, Google Business Profile and reviews, email security, booking and enquiry handling, and AI search visibility. Each one says why it matters, and many link to a free tool that checks it.

We email you the PDF and nothing else unless you tick the box. See the privacy policy.

Written by the MakeItFlow team

We build the website audit these guides are based on. Every fact is checked against the primary sources listed above and this guide was last reviewed on 30 October 2026 . How we research and check

Share LinkedIn X Facebook WhatsApp

Check your own site in 30 seconds

Run a free audit covering speed, SEO, DNS, email authentication and security headers — and get a prioritised fix list.

Weekly newsletter

One practical website fix, every week

New guides on speed, SEO, email deliverability and security — straight to your inbox. No spam, unsubscribe in one click.

Keep reading