Subdomain vs Subfolder for AI SEO Content
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.
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.
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.
| Question | Subfolder (example.com/guides) | Subdomain (guides.example.com) |
|---|---|---|
| What is it in Google's terms? | A path on your main host | A separate host under your domain |
| Does Google accept it? | Yes; Mueller said so in 2017 1 | Yes; Mueller said so in 2017 1 |
| robots.txt for AI crawlers | One file on the main host covers it | A separate robots.txt on each subdomain 4 |
| Search Console setup | Covered by your existing property | Needs a Domain property or its own URL-prefix property 5 |
| Technical freedom | Tied to the main site's platform and server | Can use a different CMS, host or server location |
| Preferred sources eligibility | A subdirectory is not eligible 6 | Eligible as a subdomain-level site 6 |
| Risk of being treated as separate | Low when linked and plainly part of the site | Higher if poorly linked to the main site 1 |
| Cost and effort to run | Lower: one site, one set of rules | Higher: 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.
- 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.
Sources
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.