Skip to content
Comparison

Subdomain vs Subfolder for AI SEO Content

The short answer

Use a subfolder, such as example.com/blog, unless you have a clear technical or business reason for a subdomain, such as blog.example.com. Google's John Mueller said in 2017 that its search works with either. The practical difference is that every subdomain is treated as its own host, so robots.txt, Search Console and tracking must be set up for each one. No public study proves that one passes more authority.

  • Google has said (in 2017) that either structure works. The better one is the one you can run well and keep long-term.
  • A subdomain is its own host: it needs its own robots.txt, sitemap and Search Console setup.
  • Public evidence that subfolders pass more authority is thin. One case study found no real difference after a move.
  • Moving between structures carries risk, so do not migrate only for SEO.
  • Default to a subfolder for content that belongs to your main brand and topic.

Should I put my AI SEO content on a subdomain or a subfolder?

Put it in a subfolder by default. A subfolder, also called a subdirectory, is a path on your main domain, such as example.com/guides. A subdomain is a separate name in front of your domain, such as guides.example.com.

Choose a subdomain only when something real forces it. Examples are a different platform that cannot sit under your main domain, a separate product with its own audience, or content you do not fully control. If none applies, the subfolder is simpler to manage and easier to reason about.

Which one fits you?

A short quiz for choosing a structure for new content. It is a rule of thumb. If you already have a live section with traffic, lean towards keeping it unless it is causing real problems.

Subfolder: keep it on the main domain

Place the content at a path such as example.com/guides, with one robots.txt, one sitemap and one property to manage.

Best when
  • The content supports your main brand and topic.
  • Your platform can host it under the main domain.
  • You want the simplest setup to manage.

Subdomain: run it as a separate host

Place the content at guides.example.com, with its own platform or rules and its own setup for crawlers and tracking.

Best when
  • A separate platform or team runs the section.
  • It is a distinct product, community or region.
  • You can keep it linked to the main site and set it up properly.

A short quiz

0 of 4 answered

Question 1 of 4Can your main platform host this section under your main domain?
Question 2 of 4How close is the content to your main offer?
Question 3 of 4Who controls what gets published?
Question 4 of 4Is there a live section with traffic today?

What does Google actually say about subdomains and subfolders?

Google said in 2017 that both work. A 2021 Ahrefs review quotes John Mueller in 2017: Google web search is fine with using either subdomains or subdirectories, and you should pick a structure you can keep for the long term 1. The same article quotes Gary Illyes at Pubcon in 2023, as relayed by the author, saying that a subdirectory not treated as part of the main site may be treated as separate 1. He described that as uncommon on the English web and more common in other languages 1.

We found no mention of the question in Google's AI guide as of 2026-10-20. It says optimising for generative AI search is still SEO and that no special files, markup or writing style are needed 2. Google's AI features page adds that a page only needs to be indexed and eligible to show with a snippet, with no further technical requirements 3.

So there is no Google rule that says AI Overviews or AI Mode prefer one structure. That is the honest state of the evidence: neither rule nor study settles it.

Does a subfolder pass more authority than a subdomain?

The public evidence does not show a clear winner. The Ahrefs review looked at the company Mention, which moved from a subdomain to a subdirectory in January 2016. The author saw no visible change at the move, and traffic grew only later, after more content was added 1.

GitHub's blog moved structures more than once, but the author notes other factors changed too, so the URL alone cannot explain the results 1. His conclusion is that the choice matters less than whether the section is integrated with the main site, for example through internal links 1.

This is a small set of cases written up by a vendor. It cannot rule out an effect in your market. It does suggest that a well-linked subdomain and a neglected subfolder will not behave the way slogans predict.

What are the practical differences that affect AI search?

The big practical difference is that each subdomain is a separate host. A robots.txt file applies only to the host, protocol and port where it sits, and Google states that a robots.txt on a subdomain is valid only for that subdomain 4. If you allow or block AI crawlers on your main site, you must repeat the decision on every subdomain, or those crawlers will follow different rules.

Search Console works the same way. A Domain property covers all subdomains and protocols, but a URL-prefix property for example.com does not include subdomains such as m.example.com, which need their own property 5. Analytics, sitemaps and consent banners also need setting up per host.

There is one AI-adjacent difference. Google's preferred sources feature, which lets users pick sites they want to see more of in results, can also appear in AI Mode and AI Overviews 6. Only domain-level and subdomain-level sites are eligible, and a subdirectory such as example.com/blog is not 6. The page does not say how much the feature affects what users see, and site owners do not have to set it up 6.

How do subdomains and subfolders compare side by side?

The table covers the points that matter in daily work. The rows on setup and on risk usually decide the choice.

Subdomain vs subfolder
QuestionSubfolder (example.com/guides)Subdomain (guides.example.com)
What is it in Google's terms?A path on your main hostA separate host under your domain
Does Google accept it?Yes; Mueller said so in 2017 1Yes; Mueller said so in 2017 1
robots.txt for AI crawlersOne file on the main host covers itA separate robots.txt on each subdomain 4
Search Console setupCovered by your existing propertyNeeds a Domain property or its own URL-prefix property 5
Technical freedomTied to the main site's platform and serverCan use a different CMS, host or server location
Preferred sources eligibilityA subdirectory is not eligible 6Eligible as a subdomain-level site 6
Risk of being treated as separateLow when linked and plainly part of the siteHigher if poorly linked to the main site 1
Cost and effort to runLower: one site, one set of rulesHigher: each host needs its own setup and checks

When is a subdomain the right choice?

A subdomain is right when separation is the point. Google's own table of URL structures for international sites lists subdomains as easy to set up, able to use different server locations and easy to separate, with the downside that users may not read the location from the URL 7. Subfolders are listed as low maintenance on the same host, with a single server location and harder separation 7.

That maps to a few real cases. Use a subdomain for a help centre run on a separate support platform, a product with its own brand and team, a community where users post freely, or a region that needs servers near its users. Use a subfolder for a blog, guides, comparison pages, pricing explainers and anything that supports your main offer.

If a platform forces a subdomain, link it tightly to the main site. Put the section in the main navigation, link from relevant pages in both directions and use the same brand name, author pages and design. The Ahrefs review suggests integration matters more than the URL form 1.

If you want your section to be selectable in Google's preferred sources tool, only a domain or subdomain qualifies 6, but this is optional and its effect is not quantified.

Can a subdomain or subfolder be used to avoid spam rules?

No. Google's spam policies list using existing or new subdomains, subdirectories or sites with the intention of continuing to violate its policies as policy circumvention 8. Moving thin or scaled content to a new host does not clean it. The rules follow the content, not the address.

Keep this in mind if you plan a large set of generated pages. Our comparison of programmatic and editorial content covers the quality checks that matter more than where the pages sit.

Should I migrate from a subdomain to a subfolder?

Usually not, if the section is healthy and well linked. Mueller advised choosing a structure you can maintain over time, because URL changes take time to settle in search 1. The Ahrefs author likewise advises against switching only for SEO, since migrations carry risk 1.

Migrate when the subdomain causes real problems: a separate platform you cannot fix, content that is poorly linked to the main site, or a split in tracking and rules that your team cannot keep straight. If you do move, redirect every old URL to its new equivalent with a 301, update internal links and sitemaps, and watch Search Console closely for several weeks. Our guide on deciding where to host your AI SEO content walks through the steps.

Crawler-access check after any structure decision (illustrative hosts)
  • Open each file in a browser and compare the rules:
  • https://example.com/robots.txt
  • https://guides.example.com/robots.txt
  • https://help.example.com/robots.txt
  • Questions to answer for each host:
  • 1. Are the AI crawlers you want to allow actually allowed?
  • 2. Is anything blocked that you want AI tools to quote?
  • 3. Does the sitemap line point to a sitemap on the same host?
  • A subfolder needs only the first file.

Frequently asked questions

Do AI crawlers treat subdomains differently from subfolders?

They follow robots.txt per host, so a subdomain needs its own file 4. A subfolder is covered by the main host's file. Beyond that, no public source we found shows AI engines favouring one structure, so check each host's rules and test your own prompts.

Will moving my blog to a subfolder raise my rankings?

There is no reliable evidence that it will. In the Mention case reported by Ahrefs, the author saw no real difference after moving from a subdomain to a subdirectory, and traffic grew only when content was added 1. Migration also carries risk, so move only for a clear operational reason.

Is a subdomain bad for Google AI Overviews?

Nothing in Google's AI documentation says so. Google states there are no additional requirements for AI Overviews and AI Mode beyond being indexed and eligible for a snippet 3. What matters is that the section is crawlable, linked to your main site and useful.

Can I use a subdomain for a regional or language version?

Yes. Google lists subdomains as easy to set up and able to use different server locations, while noting that users may not recognise the geotargeting from the URL alone 7. Google notes the same readability drawback applies to subdirectories. Subfolders are simpler to maintain. Pick whichever your team can run consistently.

What is the biggest mistake with subdomains?

Forgetting that each one is separate. A robots.txt on one subdomain does not apply to another 4, and Search Console data for a subdomain is missed if you only added a URL-prefix property for the main site 5. Set up and check every host.

About the author

Rahil Jain

Rahil Jain is an AI SEO (answer engine and generative engine optimisation) consultant and co-founder of Chalk Labs.

LinkedIn · Method and credentials

Sources

  1. Subdomain vs Subfolder: Which Is Better for SEO? · AhrefsOpened October 20, 2026. Supports: Published March 9, 2021. Mueller 2017 quote that Google web search is fine with either; Illyes 2023 remark as relayed by the author; Mention and GitHub cases; advice not to migrate only for SEO.
  2. Optimizing your website for generative AI features on Google Search · Google Search CentralOpened October 20, 2026. Supports: Optimising for generative AI search is still SEO; no special files, markup or writing style needed; the page does not discuss subdomains or subdirectories; last updated 2026-07-10.
  3. AI features and your website · Google Search CentralOpened October 20, 2026. Supports: A page must be indexed and eligible to show with a snippet; no additional requirements for AI Overviews and AI Mode; last updated 2025-12-10.
  4. How Google interprets the robots.txt specification · Google Search CentralOpened October 20, 2026. Supports: Rules apply only to the host, protocol and port where the file is hosted; a robots.txt on a subdomain is only valid for that subdomain; last updated 2026-08-31.
  5. Add a website property to Search Console · Google Search Console HelpOpened October 20, 2026. Supports: Domain properties include all subdomains and protocols; URL-prefix properties exclude subdomains such as m.example.com.
  6. Preferred sources · Google Search CentralOpened October 20, 2026. Supports: Can appear in AI Mode and AI Overviews; only domain-level and subdomain-level sites eligible, not subdirectories; setup optional; last updated 2026-09-18.
  7. Managing multi-regional and multilingual sites · Google Search CentralOpened October 20, 2026. Supports: Google's table of pros and cons for subdomains and subdirectories (easy to set up, different server locations, separation); last updated 2025-12-10.
  8. Spam policies for Google web search · Google Search CentralOpened October 20, 2026. Supports: Policy circumvention: using existing or new subdomains, subdirectories or sites to continue violating policies; last updated 2026-08-28.
How this page was made. Built on Rahil Jain's AI SEO method and drafted with AI research assistance. Every statistic links to the page we read it on (opened October 20, 2026 or nearby). Published October 20, 2026; last updated October 20, 2026. Chalk Labs sells AI SEO services, so we have a commercial interest in this topic. Spotted an error? Tell us and we will fix it.