← Back to Blog
Fabian van TilFabian van Til··9 min read

robots.txt, sitemap.xml, and llms.txt: The Three Files Every Website Needs in 2026

robots.txt controls crawler access. sitemap.xml maps your URLs. llms.txt explains your site to AI. Learn what each file does, how they work together, and how to set up all three for AI visibility.

Three Files Every Website Needs

For two decades, websites relied on two root-level files to communicate with search engines: robots.txt and sitemap.xml. One controls access. The other maps content. Together, they tell crawlers where to go and what to index.

In 2024, a third file joined them: llms.txt. This file does not control access or map URLs. It explains meaning. It tells AI language models what your site is, what it covers, and how your content should be understood.

If you run a website in 2026 and you want to be visible to both traditional search engines and AI systems like ChatGPT, Perplexity, and Google Gemini, you need all three files configured correctly. This guide explains what each one does, how they differ, and how to set them up together.

robots.txt: Controlling Crawler Access

What robots.txt does

robots.txt is a plain-text file at your domain root (yoursite.com/robots.txt) that tells web crawlers which parts of your site they are allowed to visit and which parts they should avoid. It has been a web standard since 1994.

The file uses a simple directive syntax:

User-agent: *
Allow: /
Disallow: /admin/
Disallow: /private/
Disallow: /checkout/

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

How to configure robots.txt for AI crawlers

AI crawlers have their own user agents. If you want to control how AI systems access your site, you can add specific rules for them:

User-agent: GPTBot
Allow: /blog/
Allow: /docs/
Disallow: /admin/
Disallow: /user-data/

User-agent: ClaudeBot
Allow: /
Disallow: /admin/

User-agent: PerplexityBot
Allow: /
Disallow: /admin/

Known AI crawler user agents as of 2026:

  • GPTBot: OpenAI's web crawler for ChatGPT
  • ChatGPT-User: ChatGPT's browsing mode when a user asks it to visit a page
  • ClaudeBot: Anthropic's web crawler for Claude
  • PerplexityBot: Perplexity's search crawler
  • Google-Extended: Google's AI training crawler (separate from Googlebot)
  • Applebot-Extended: Apple's AI training crawler

A common mistake: blocking all AI crawlers. If you block GPTBot, ChatGPT cannot access your content when users ask it questions about your industry. Your competitors who allow access will be cited instead. Block only the specific directories that contain sensitive data, user content, or areas where AI access provides no benefit.

robots.txt best practices

  • Always include a Sitemap: directive pointing to your sitemap.xml
  • Block admin panels, login pages, and user data directories
  • Do not block your blog, docs, or product pages from AI crawlers unless you have a specific reason
  • Test your robots.txt with Google Search Console's robots.txt tester
  • Review and update quarterly as new AI crawlers emerge

sitemap.xml: Mapping Your Content

What sitemap.xml does

sitemap.xml is an XML file that lists the URLs on your website along with metadata about each page: when it was last modified, how frequently it changes, and its relative priority. It lives at yoursite.com/sitemap.xml and helps search engines discover and index your content efficiently.

Basic sitemap structure:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://yoursite.com/</loc>
    <lastmod>2026-04-01</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>
  <url>
    <loc>https://yoursite.com/blog/my-article</loc>
    <lastmod>2026-03-28</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

sitemap.xml best practices

  • Include only canonical URLs: Do not list duplicate pages, paginated URLs, or URL variants with tracking parameters.
  • Keep lastmod accurate: Only update the lastmod date when the page content actually changes. False lastmod dates erode crawler trust.
  • Use sitemap index files for large sites: If your site has more than 50,000 URLs, split your sitemap into multiple files referenced by a sitemap index.
  • Exclude noindex pages: If a page has a noindex meta tag, it should not appear in your sitemap.
  • Reference your sitemap in robots.txt: Add Sitemap: https://yoursite.com/sitemap.xml to your robots.txt so crawlers can find it immediately.
  • Submit to Google Search Console: After creating or updating your sitemap, submit it through GSC for faster indexing.

llms.txt: The New Third File for AI Comprehension

What llms.txt does

llms.txt is a Markdown file at your domain root (yoursite.com/llms.txt) that gives AI language models a structured summary of your website. It was proposed by Jeremy Howard in 2024 and has been adopted by hundreds of companies including Supabase, Stripe, and Cloudflare.

Where robots.txt controls access and sitemap.xml maps URLs, llms.txt explains context. It tells AI systems what your brand is, what topics you cover, which pages are most authoritative, and how your content should be interpreted.

Basic llms.txt structure:

# Your Brand Name

> One-sentence definition of what your brand does and who it serves.

## Docs
- [Getting Started](https://yoursite.com/docs/start): Setup guide for new users
- [API Reference](https://yoursite.com/docs/api): Complete API documentation

## Products
- [Product A](https://yoursite.com/products/a): Description of what Product A does
- [Product B](https://yoursite.com/products/b): Description of what Product B does

## Optional
- [Changelog](https://yoursite.com/changelog): Release notes and version history

For a full breakdown of the llms.txt format and every element it supports, read our llms.txt format specification guide.

Comparison: What Each File Controls

robots.txtsitemap.xmlllms.txt
PurposeAccess controlURL discoverySemantic context
FormatCustom directivesXMLMarkdown
Tells crawlersWhere they can goWhich pages existWhat the site means
AudienceAll web crawlersSearch engine botsAI language models
Since199420052024
StandardRFC 9309 (2022)sitemaps.org protocolCommunity convention
ComplianceBroadly respectedBroadly supportedGrowing adoption
Failure modeCrawlers access everythingSlower content discoveryAI infers context (less accurate)

How the Three Files Work Together

Think of these files as three layers of communication with machines that visit your site:

  1. robots.txt answers: "Can I come in?" It sets the boundaries. Before a crawler reads any content, it checks robots.txt to see what is allowed. This applies to both traditional search bots and AI crawlers.
  2. sitemap.xml answers: "Where should I look?" Once a crawler is allowed in, the sitemap shows it the full inventory of pages, with metadata about recency and priority. This speeds up content discovery for both Google and AI systems.
  3. llms.txt answers: "What does this all mean?" After an AI system knows which pages exist, llms.txt provides the interpretive layer. It explains the brand, the content structure, and the relationships between different sections. This is the file that shapes how AI models describe and recommend your brand.

Without robots.txt, you lose access control. Without sitemap.xml, crawlers discover your content more slowly. Without llms.txt, AI systems have to guess at context, and their guesses are often wrong or incomplete.

Setting Up All Three for AI Visibility

Step 1: Audit your robots.txt

Check your current robots.txt at yoursite.com/robots.txt. Verify that you are not blocking AI crawlers from your public content. Add specific user-agent rules for GPTBot, ClaudeBot, and PerplexityBot if you want granular control. Make sure your Sitemap directive points to the correct URL.

Step 2: Validate your sitemap.xml

Confirm your sitemap includes all your important public pages with accurate lastmod dates. Remove any noindex pages, redirects, or error pages. Submit it to Google Search Console. For sites with multiple languages, use hreflang annotations or separate sitemaps per locale.

Step 3: Create your llms.txt

This is the file most websites are still missing. You can use our free generator to create one automatically. The tool crawls your site, identifies your key pages, and produces a properly structured llms.txt file with entity definition, sections, and link descriptions.

If you prefer to build it manually, start with the H1 (brand name), blockquote (entity definition), and 3 to 5 sections grouping your most important pages. For the full specification, see our complete llms.txt guide.

Step 4: Test the full setup

Visit all three files in your browser to confirm they are accessible:

  • yoursite.com/robots.txt
  • yoursite.com/sitemap.xml
  • yoursite.com/llms.txt

Then test with AI systems. Ask ChatGPT and Perplexity questions about your brand and your industry. Check whether the responses reflect your llms.txt framing. Monitor this monthly as AI models update their knowledge bases on different schedules.

What Happens If You Skip One

  • No robots.txt: All crawlers access everything, including pages you might want to keep private. AI systems may index checkout flows, admin panels, or user-generated content that misrepresents your brand.
  • No sitemap.xml: Search engines and AI crawlers will still find your pages through links, but the process is slower and you lose control over priority signals. New content takes longer to be discovered.
  • No llms.txt: AI systems have to infer your brand identity from scattered signals. Their representation of your brand will be less accurate, less consistent, and more likely to include errors or outdated information.

All three files take minimal effort to set up. robots.txt and sitemap.xml are likely already on your site. llms.txt is the one most businesses still need to add. Build yours now and complete the set.

Fabian van Til

Fabian van Til

Founder, Akravo — AI Visibility Strategist

Fabian van Til is an AI visibility strategist and e-commerce entrepreneur. He built and sold a specialist SEO agency, scaled multiple brands from zero, and in 2024 discovered his own brands were invisible in AI search despite strong Google rankings. He spent months figuring out why — and built Akravo from that research.

Want to implement AI SEO for your business?

Book a call