Last updated: October 2026

A subdomain is a prefix before your main domain, such as blog.example.com. A subdirectory (or subfolder) is a path after it, such as example.com/blog/. The SEO question is whether to put a section of your site, usually the blog, a shop or another language, on one or the other. Google does not say that one ranks better. Its own page on site structure lists both as valid options and gives pros and cons about setup, servers and separation, not ranking. We read 6 pages that rank for "subdomain vs subdirectory SEO" on 3 November 2026: all 6 talk about links or authority, but only 4 quote what Google says. Then we looked at the host of 377 URLs that ranked in our own research: 18 of them (4.8%) are on a subdomain.

This guide gives the short answer, shows what Google says, compares what the guides claim, and shares our own numbers. Then it covers when each structure fits and how to check or move one. If you are planning a move, read our site migration guide first.

Subdomain vs Subdirectory SEO: The Short Answer

For most sites, a subdirectory is the simpler choice: it keeps everything on one host, so there is one site to manage and measure. A subdomain makes sense when a section is truly separate, such as a help centre on its own platform, an app, or a different team's site. We have no ranking test that proves one beats the other, so we do not claim one. What we can show is what Google documents and what we measured. Are subdomains bad for SEO? Google does not say so, and 18 of the 377 URLs we checked rank from one. But a subdomain is a separate host with its own setup, and that is where the extra work, and the risk of mistakes, lies.

Subdomain vs Subfolder: What Each One Is

The difference between a domain and a subdomain is where the name sits. In shop.example.com, "example.com" is the root domain and "shop" is the subdomain. In example.com/shop/, the same word is a subdirectory, a folder on the same host. People also say subfolder, and it means the same thing as subdirectory. A root domain vs subdomain comparison is a comparison of the main site with a prefix of it. Three practical facts follow:

  • A subdomain is a different host, so it can be served by a different server, platform or team.
  • A subdirectory is part of one host, so it shares the same server, certificate and settings.
  • Rules set per host, such as robots.txt, apply to one but not the other.

What Google Says About Subdomains and Subdirectories

Google's page on managing multi-regional and multilingual sites has a table of URL structure options. It lists subdomains (de.example.com) with these pros: easy to set up, allows different server locations, and easy separation of sites. The listed con is that users might not recognise geotargeting from the URL alone. It lists subdirectories (example.com/de/) with these pros: easy to set up and low maintenance because they share the same host. The cons are that users might not recognise geotargeting, that there is a single server location, and that separation of sites is harder. Nothing in that table says one ranks higher. The page was last updated on 10 December 2025.

Table of Google's pros and cons: subdomains are easy to set up

Another Google page, on localised versions, adds a useful note: language-specific subdomains such as en, en-gb, en-us and de "are not used by Google to determine the target audience for the page", so you must map the audience explicitly. That page was last updated on 21 September 2026, and the usual way to map it is hreflang. Our free hreflang generator builds the tags for either structure.

What 6 Ranking Guides Say About Subdomain vs Subdirectory

Table of what 6 pages on subdomain vs subdirectory say

The median guide has about 1,637 words. All 6 talk about links or authority and all 6 cover the blog question: should the blog live at blog.example.com or example.com/blog/? 5 cover international sites and 4 cover online stores. Only 4 quote something Google has said, and only 2 give a case study from a real move. 1 mention robots.txt, 2 mention Search Console and 1 give a clear "when to use each" section. So the gap is evidence: the guides agree on the arguments, but most do not show data. That is why we measured something.

We Checked 377 Ranking URLs: How Many Are on a Subdomain?

Our research for earlier guides saved Google US results for 47 searches, and today's three searches add three more files, 50 in all. We took every unique URL from those files and looked at its host. There are 377 unique URLs. 18 of them (4.8%) are on a subdomain other than www, and 359 are on a main domain or www.

Table of 377 ranking URLs: 359 on the main domain or www, 18 on a subdomain, of which 14 are help

Of the 18, 14 are help, documentation, forum or learning hosts, such as developers., support., community. and help. sites. 4 are blog subdomains. We should be careful about what this shows. It is not a ranking test: the searches were about SEO topics, the sample is small, and ranking depends on much more than the host. It does show two things. Most ranking pages in our research sit on a main domain, and a subdomain can rank: blog subdomains did.

Infographic of subdomain vs subdirectory: 18 of 377 ranking URLs sit on a subdomain

Our Own Site: 433 Pages, One Host

We use subdirectories. In our Search Console export of 28 October 2026, all 433 pages with impressions are on contomatix.com (431 on the bare domain and 2 on www). 374 are under /blog/, 38 under /tools/, 10 under /services/ and 6 under /team/. It suits us because one host means one set of settings, one sitemap and one robots.txt, and one set of Search Console data. We have not tested a subdomain on our own site, so we cannot say how it would rank, only that the single-host setup has been easy to run.

When to Use a Subdomain

  • A separate product or app. A login area or app at app.example.com is a different thing from your marketing pages.
  • A different platform. If your help centre or shop runs on its own software, a subdomain lets you point it there without moving your main site.
  • Different servers or teams. Google lists "allows different server locations" as a pro.
  • Clear separation. A subdomain is easy to separate, which helps when one section may be sold or handed to another team.
  • Language or country sites. Google lists it as an option, but you must still map the audience with hreflang.

When to Use a Subdirectory

  • A blog that supports the main site. If the posts are meant to help the same brand rank, keeping them on one host is simpler.
  • A small or medium site. One host, one sitemap, one robots.txt and one Search Console property are less to manage.
  • When you have one team. The same people can run the whole site.
  • When you want low maintenance. Google lists "low maintenance (same host)" as a pro.

Subdomain vs Subdirectory for a Blog

All 6 guides cover the blog question, and it is the one most people ask. Our view, from running a blog of 363 posts: put it in a subdirectory unless your blog runs on separate software that cannot live under the main domain. A blog on the same host is a single site to maintain. If you already have a blog on a subdomain, do not move it only because of a guide. Moving has a cost, and we have no data that says the move pays off. If you do move, use 301 redirects from every old URL and follow our 301 vs 302 redirect guide.

Subdomain vs Subdirectory for International Sites

5 of 6 guides cover this. Google's table lists country-specific domains, subdomains and subdirectories, and rates each on setup, servers, separation and clarity of geotargeting. Whichever you pick, map every version with hreflang, and make each page link to the others. Our canonical and hreflang guide covers the mistakes that break the setup, and our hreflang sitemap validator checks a sitemap for them.

Robots.txt and Subdomains: Each Host Has Its Own

A mistake that catches people is robots.txt. Google's page on robots.txt (last updated 23 October 2026) says the rules are valid for all files in all subdirectories on the same host, protocol and port number, and that they are not valid for other subdomains, protocols or port numbers. So a robots.txt on example.com does not control blog.example.com, and a "disallow" on the subdomain needs its own file there. With a subdirectory, one file covers the whole host. Our free robots.txt tester checks a file, and we explain more in our robots.txt guide.

How to Create a Subdomain

  1. Add a DNS record. At your DNS provider, add an A or CNAME record for the name, such as blog, pointing to the server or service that will host it.
  2. Set up the host. Tell the server or platform to accept the new name and add a certificate, so the site runs over https.
  3. Add it to Search Console. Verify the new host or use a domain-level property so you can see its data.
  4. Add robots.txt and a sitemap. The new host needs its own.
  5. Link between the two. Add clear links between the main site and the subdomain.

How to Check Whether a Page Is on a Subdomain

Look at the address. If there is a name before the main domain, other than www, it is a subdomain. In a list of URLs, take the host and compare it with the registered domain. We did that for 377 URLs with a short script. For a site, compare the hosts in your Search Console page report: ours showed one host. Our guide on setting up Google Search Console shows where the page report is.

Moving From a Subdomain to a Subdirectory (or Back)

A move is a migration. The checklist is the same either way: map every old URL to its new one, use 301 redirects, update internal links, canonical tags and sitemaps, and watch Search Console for errors. Expect rankings to move for a while as Google processes the change. We would not move without a clear reason, such as retiring a platform or merging two sites. Our site migration guide has the steps.

Common Subdomain vs Subdirectory Mistakes

  • Moving because of a rule of thumb. Google does not say one ranks better, so do not move without a reason.
  • Forgetting robots.txt on the new host. Each subdomain needs its own file.
  • Leaving the sitemap on the old host. List URLs on the host they belong to.
  • Skipping redirects. A move without 301s throws away the old pages' history.
  • Assuming a language subdomain targets a country. Google says it is not used to determine the audience, so use hreflang.

Frequently Asked Questions

Are subdomains bad for SEO?

Google does not say so. Its page on site structure lists subdomains as a valid option with pros and cons about setup and servers, and 18 of the 377 ranking URLs we checked sit on one. A subdomain is a separate host, though, so it needs its own setup.

Is a subdomain or a subdirectory better for SEO?

Google does not say one ranks better. For most sites a subdirectory is simpler to run because everything shares one host. A subdomain fits a truly separate section, such as an app or a help centre on another platform.

What is the difference between a domain and a subdomain?

The domain is the main name, such as example.com. A subdomain is a prefix on it, such as blog.example.com. A subdirectory is a path after it, such as example.com/blog/.

What is the difference between a subdomain and a subfolder?

A subdomain is a different host that can run on a different server. A subfolder, or subdirectory, is a folder on the same host. Subfolder and subdirectory mean the same thing.

Should my blog be on a subdomain or a subdirectory?

We would use a subdirectory unless the blog runs on separate software that cannot sit under the main domain. We have no data that says moving an existing blog pays off.

Does robots.txt on my main domain cover my subdomain?

No. Google says the rules are valid only for the host, protocol and port where the file sits, and are not valid for other subdomains. Each subdomain needs its own robots.txt.

Which is better for an international site?

Google lists country domains, subdomains and subdirectories with pros and cons. Whichever you choose, map each version with hreflang, because Google says language subdomains are not used to determine the audience.

How do I create a subdomain?

Add an A or CNAME record at your DNS provider, set up the host with a certificate, add it to Search Console, give it its own robots.txt and sitemap, and link it from the main site.

Can I move from a subdomain to a subdirectory?

Yes. It is a migration: map each old URL to the new one, use 301 redirects, update links, canonicals and sitemaps, and watch Search Console. Do it only for a clear reason.

Planning a migration or a new section and unsure where it should live? Talk to us and we will check your setup before you move anything.