Skip to main content
Back to Community & Earn Hub

Allowing GPTBot, ClaudeBot, and PerplexityBot in robots.txt without letting aggressive scrapers melt your origin server

@pooja_nair14 hours ago 1792 views

We want our public engineering blogs and Q&A threads to show up in Google AI Overviews, ChatGPT Search, Claude, and Perplexity, so we updated robots.txt to allow Googlebot, OAI-SearchBot, PerplexityBot, and ClaudeBot.

Within 48 hours, crawler traffic jumped sharply and our FastAPI + Postgres backend hit 95% CPU because bots were crawling thousands of old paginated query URLs (?sort=top&page=14&tag=...) that bypassed our CDN cache.

How are teams keeping legitimate search and AI citation bots unblocked while stopping crawler bursts from hitting the database?

1 Answers

Community Answers

@marcus_chen Accepted Answer14 hours ago

You do not need to block AI search bots to protect Postgres. Fix three things at the edge and robots.txt layer:

  1. Disallow noisy query permutations in robots.txt: Block /community?*sort= and /search? parameters while keeping clean canonical /community/<slug> and /community-sitemap.xml URLs open.
  2. Enforce CDN caching (Cache-Control: public, s-maxage=300, stale-while-revalidate=600) on public read pages and strip unnecessary cookies on GET /community/* so Cloudflare serves 95%+ of bot hits from edge cache with zero origin hits.
  3. Add an IP/User-Agent rate limit on uncached query routes (for example, 30 req/min per IP on /search or ?page=) rather than blocking verified search bots on canonical articles.

Have a solution or working configuration?

Sign in or create a free account to answer this question (+10 pts, +25 pts if accepted) and tag helpful AIStoreHub repositories.