Robots.txt for AI Search in 2026: Separating OAI-SearchBot and PerplexityBot from Training Crawlers
Most small-business websites still ship a default robots.txt file from five years ago, or copy a generic "block all AI" snippet from social media that quietly breaks their visibility in AI search answers. In 2026, treat
Most small-business websites still ship a default robots.txt file from five years ago, or copy a generic "block all AI" snippet from social media that quietly breaks their visibility in AI search answers.
In 2026, treating every AI user-agent the same is a mistake. Search discovery bots and model training crawlers serve completely different purposes, and modern crawlers expose separate user-agent tokens so site owners can control each category cleanly.
Search Crawlers vs. Training Crawlers
Before editing robots.txt, separate crawlers into two distinct groups:
-
Search and live answer retrieval bots (
Googlebot,Bingbot,OAI-SearchBot,PerplexityBot): These fetch public pages so your business can appear in traditional search results and real-time cited AI answers. Blocking them removes your pages from discovery. -
Model training crawlers (
GPTBot,Google-Extended,CCBot,ClaudeBotwhen configured for training): Site owners who want search visibility while opting out of bulk model training can disallow specific training user-agents without touchingGooglebot,Bingbot, orOAI-SearchBot.
Here is a clean RFC 9309 configuration that allows traditional search and live AI search while disallowing bulk training bots:
User-agent: Googlebot
Allow: /
User-agent: Bingbot
Allow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: GPTBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /cart/
Disallow: /checkout/
Sitemap: https://example.com/sitemap.xml
Four Common Robots.txt Bugs That Hurt Rankings
Even experienced developers ship subtle robots.txt errors during launches and migrations:
-
Leftover staging
Disallow: /rules: Moving a staging site to production withUser-agent: *andDisallow: /still active tells Googlebot to drop the entire domain from search. -
Relative
Sitemap:paths: WritingSitemap: /sitemap.xmlinstead of a fullhttps://yourdomain.com/sitemap.xmlURL violates the Sitemaps protocol and is ignored by several crawlers. -
Blocking CSS and JavaScript assets: Disallowing
/assets/or/wp-content/themes/stops Googlebot from rendering mobile layouts cleanly, hurting mobile-first indexing and Core Web Vitals diagnostics. -
Assuming
robots.txtguarantees privacy ornoindex:robots.txtcontrols crawling, not indexing. If another site links to a disallowed URL, search engines can still index the URL stub without reading a<meta name="robots" content="noindex">tag inside it.
How to Deploy Safely on Hosted Builders
How you update robots.txt depends on your platform:
- WordPress: Edit via Yoast SEO, Rank Math, or your server root without adding raw Apache redirects you do not need.
-
Shopify: Do not try to upload a static file to the store root. Instead, create a
robots.txt.liquidtemplate inside your duplicate staging theme via Online Store > Themes > Edit code so checkout and default Shopify rules remain intact. -
Webflow: Update the custom
robots.txtbox under Site Settings > SEO > Indexing and republish to staging first. - Wix: Use Wix SEO Tools > Robots.txt Editor rather than looking for server files.
Generate and Validate Your Robots.txt Free
You can build a clean, RFC 9309-compliant file with one-click presets for WordPress, Shopify, and AI crawler policies, or inspect any live domain's current robots.txt and AI bot accessibility directly in the browser:
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.