SEO
What should be in my robots.txt?
Allow everything you want crawled, disallow only genuinely wasteful paths such as internal search results, reference your sitemap, and name the AI crawlers explicitly. Remember it controls crawling, not indexing — disallowing a page does not remove it from search.
A sane baseline
User-agent: *
Allow: /
Disallow: /api/
Disallow: /cgi-bin/
User-agent: Googlebot
Allow: /
User-agent: GPTBot
Allow: /
User-agent: ClaudeBot
Allow: /
Sitemap: https://example.com/sitemap-index.xmlThe four mistakes worth avoiding
- Disallow: / left in from staging — two characters from working, and it removes the site from search
- Blocking /assets/ or /js/, which prevents rendering and makes Google index a broken layout
- Using it to hide private URLs. The file is public, so it is a directory of what you wanted hidden
- Disallowing a page that also has noindex, which blocks the crawl that would read the noindex
The check almost nobody runs
Fetch robots.txt with each crawler user-agent rather than in a browser. Some hosts return 403 to AI crawlers at their edge, so the file is never delivered to the crawlers it addresses.
The longer version
This answer is deliberately short. If you want the full treatment, robots.txt in 2026, including every AI crawler worth naming covers it in about 3 minutes — free, ungated, written from client work.
Who answered this
Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada and Pakistan — fifteen live client sites, six of them stores taking real payments. These answers come from those projects rather than from a content brief. More about how I work, or ask me something directly.