Robots.txt

Robots.txt: Complete 2026 Guide to Setup, Syntax & AI Bot Control

Robots.txt is a small text file, but getting it wrong can silently cut off your organic traffic — and in 2026, it also decides whether AI models like ChatGPT and Claude can read your site at all. This guide covers what it is, how to write it correctly, and how to control AI crawlers without breaking your SEO.

TL;DR

  • Robots.txt is a plain-text file at yourdomain.com/robots.txt that tells crawlers which pages to crawl.
  • It controls crawling, not indexing. Use a noindex tag to keep a page out of search results.
  • It is advisory — legitimate bots follow it, malicious bots ignore it.
  • In 2026, it’s also how you allow or block AI bots like GPTBot, ClaudeBot, and PerplexityBot.
  • The file must sit at your root domain and be error-free — small mistakes have big consequences.
Add IxieVerse as a preferred source on Google

What Is Robots.txt?

A robots.txt file is a plain-text file placed at the root of a website that tells crawlers which URLs they may or may not request. It follows the Robots Exclusion Protocol, a standard created in 1994. Every well-behaved crawler — Googlebot, Bingbot, and AI bots — checks this file before requesting any other page on your site.

How Does Robots.txt Work? — Step by Step

  1. A crawler requests yourdomain.com/robots.txt before touching any other page.
  2. If the file exists, the crawler reads the rules that apply to its own user-agent name.
  3. It follows the matching Allow and Disallow paths for every URL it considers requesting.
  4. If no robots.txt exists, the crawler assumes the entire site is open to crawl.

Robots.txt vs. Noindex vs. Llms.txt: What’s the Difference?

These three tools sound similar but do different jobs. Robots.txt stops crawling. Noindex stops indexing. Llms.txt is a newer, unofficial file that gives AI models a curated summary of your site — it doesn’t block or allow anything on its own.

MethodControls Crawling?Controls Indexing?Best Use
Robots.txtYesNo (indirect)Block low-value paths; allow/block AI bots
Noindex meta tagNoYesKeep a crawlable page out of search results
X-Robots-TagNoYesBlock indexing of PDFs, images, non-HTML files
Llms.txt (emerging)No (advisory only)NoPoint AI models to your key pages and summaries

Where Robots.txt Must Live

Your robots.txt file must sit at your root domain — https://yourdomain.com/robots.txt — with no exceptions. A file placed in a subfolder is ignored by every major crawler, even if your CMS lives in a subdirectory. It must return a 200 status code with a text/plain content type.

Robots.txt Syntax Cheat Sheet

DirectiveWhat It DoesExample
User-agentNames the crawler the rule applies toUser-agent: Googlebot
DisallowBlocks a URL path from crawlingDisallow: /admin/
AllowOverrides a Disallow for a specific pathAllow: /admin/help/
SitemapPoints crawlers to your XML sitemapSitemap: https://example.com/sitemap.xml
* wildcardMatches any sequence of charactersDisallow: /*?sort=
$ end anchorMatches the exact end of a URLDisallow: /*.pdf$

Five rules to never break: one directive per line, User-agent always comes before its rules, paths are case-sensitive, use a blank line between rule groups, and keep the file under 500 KB.

Example Robots.txt File

User-agent: *

Disallow: /admin/

Disallow: /cart/

Disallow: /checkout/

User-agent: GPTBot

Disallow: /

Sitemap: https://example.com/sitemap.xml

Want this file built for you instead of writing it by hand? IxieVerse’s free robots.txt generator creates a validated file — AI bot rules included — in under a minute, no signup required.

Explore: Reddit SEO: How to Boost Your Visibility and Traffic in 2026

How to Add or Edit Robots.txt by Platform

  • WordPress: Yoast SEO users go to SEO > Tools > File Editor. Rank Math users go to Rank Math > General Settings > Edit Robots.txt. Or upload a plain-text file manually via FTP.
  • Shopify: Edit the auto-generated robots.txt.liquid file under Online Store > Themes > Edit Code.
  • Wix, Squarespace, and other builders: Most auto-generate a file; check your platform’s documentation for custom rule support.
  • Any platform: Create a plain-text file named exactly “robots.txt”, save as UTF-8, upload to your root directory, and confirm it loads at yourdomain.com/robots.txt.

Blocking or Allowing AI Bots in 2026

This is now a strategic decision, not just a technical one. If you want AI citations and referral traffic from tools like ChatGPT and Perplexity, allow their crawlers. If your content is paywalled or proprietary, block the specific bot by name rather than blocking every crawler.

AI PlatformBot NamePurpose
OpenAI / ChatGPTGPTBotModel training
OpenAI / ChatGPTChatGPT-UserReal-time browsing for user queries
Anthropic / ClaudeClaudeBotTraining data collection
Perplexity AIPerplexityBotPowers Perplexity’s real-time answers
Google GeminiGoogle-ExtendedGemini training (separate from Googlebot)
Common CrawlCCBotFeeds many other AI models’ training sets
AppleApplebot-ExtendedApple Intelligence training

Bot names change often. Always confirm the current user-agent name in each platform’s official documentation before adding a block — an outdated name will fail silently.

Also Read: 20 Best Free SEO Tools in 2026 (Tested, Ranked & Beginner-Friendly)

What Is Llms.txt?

Llms.txt is an emerging, unofficial file that gives AI models a plain-language summary of a site’s most important pages. It is not yet adopted industry-wide and does not replace robots.txt — it’s a supplementary signal some publishers are testing to improve how accurately AI tools describe their content.

Common Robots.txt Mistakes That Kill Traffic

  • Disallow: / left over from a staging site — blocks the entire live site.
  • Blocking CSS/JS folders, which prevents Google from rendering pages properly.
  • Placing the file in a subfolder instead of the root domain.
  • Assuming Disallow removes a page from search results — it only stops crawling; use noindex for that.
  • Forgetting the Sitemap: line entirely.
  • Case-sensitivity errors — /Admin/ and /admin/ are different paths.

How to Audit Your Robots.txt File

  1. Open yourdomain.com/robots.txt directly in a browser.
  2. Check Google Search Console under Settings to see the version Google has cached.
  3. Crawl your site with a tool like Screaming Frog to flag any important pages that are accidentally blocked.
  4. In GSC, review the “Blocked by robots.txt” and “Crawled — currently not indexed” reports.
  5. Re-test after every redesign, migration, or CMS update.

Robots.txt Best Practices for 2026

  • Always include a Sitemap directive.
  • Test every change in Google Search Console before publishing.
  • Use robots.txt for crawl efficiency only — never as a security or privacy tool, since the file itself is public.
  • Review the file quarterly and immediately after any site migration.
  • Keep your AI bot rules current — new crawlers appear every few months.

Discover: How to Use Structured Data for SEO and LLM Visibility in 2026

Conclusion

Robots.txt is one of the smallest files on your website and one of the most consequential. The fundamentals haven’t changed: know your directives, test before deploying, and never block CSS, JS, or your sitemap by accident. What has changed in 2026 is scope — this file now decides whether AI models can read, cite, and recommend your content. Get it right once, review it quarterly, and it becomes a permanent asset instead of a recurring risk.

Ready to stop guessing at syntax? Build a validated, AI-bot-ready robots.txt file in under a minute with IxieVerse’s free robots.txt generator — no signup required.

Frequently Asked Questions

Does robots.txt stop a page from showing in Google?

No. Robots.txt blocks crawling, not indexing. A blocked page can still appear in search results if other sites link to it. To remove a page from results, use a noindex meta tag or an X-Robots-Tag header instead.

What happens if my site has no robots.txt file?

Crawlers treat a missing file as an open invitation to crawl everything. This is usually fine for small sites, but larger sites risk wasting crawl budget on thin or duplicate pages.

Can I block only some AI bots and not others?

Yes. Add a separate User-agent block for each bot, such as GPTBot or ClaudeBot, with Disallow: / underneath it. You can allow Googlebot full access while blocking AI training bots in the same file.

Is robots.txt case-sensitive?

Yes, paths are case-sensitive, so /Admin/ and /admin/ are treated as different URLs. Directive names like Disallow and User-agent are not case-sensitive.

Does Google support Crawl-delay?

No, Googlebot ignores Crawl-delay. Use the crawl rate settings inside Google Search Console instead. Bing and some other crawlers still honor it.

Does robots.txt block Google Analytics or tracking scripts?

Not unless you specifically disallow the path serving that script. Blocking broad folders like /wp-content/ or /assets/ can unintentionally block tracking or rendering scripts, so always test paths individually.

Add a Comment

Your email address will not be published. Required fields are marked *