Stop AI agents from scraping your website without hurting your Google rankings: have a coding agent audit how your site answers bots, verify real Googlebot by IP, and serve scrapers a polite no instead of an error they retry: AI agent prompt

More people now paste a site's URLs into a coding agent and ask it to copy everything, which can cost the owner data, server and API spend. On Oct 28, 2026 a founder posted on X that when he returned 403 errors, the agents spoofed a Googlebot user agent, probed his /api/ routes and launched headless browsers, so he built a 6-layer 'AI Agent Firewall' and open-sourced it as a SKILL.md file. Its core rules: don't send a bare 403 or 429 (agents treat it as a puzzle to retry), serve an HTTP 200 page with no data that tells the agent scraping isn't allowed and links to the official product, verify Googlebot by IP and network rather than user agent, lock sitemaps and public JSON APIs, add per-IP rate limits and test the setup by attacking your own URLs. The post passed 19,000 views and 650 bookmarks within a day. The prompt below runs a safe version of that audit on your own site.

SecurityAI scraper blockingadvanced

The prompt

Help me protect my own website from AI agents and scripts that scrape it, without hurting search indexing. My site: [domain, what's valuable on it (e.g. listings, prices, a dataset), stack (e.g. Next.js on Cloudflare, WordPress, Express)]. Where I want scrapers sent instead: [signup page, API page or product URL]. 1) Audit first, change nothing: list which pages, sitemaps and /api/ routes expose the valuable data or trigger expensive work, and how each currently responds to a normal browser, curl, a fake 'Googlebot' user agent and a headless browser. 2) Propose a layered plan: a robots.txt and llms.txt policy (which crawlers to allow and which to disallow), verifying real Googlebot by IP and network rather than user agent, a polite HTTP 200 notice page with no data rows and noindex headers for blocked requests, browser-header checks, per-IP rate limits, and locking public JSON endpoints. 3) For each layer, explain the risk of blocking real visitors, accessibility tools or search engines, and how to test that Google can still crawl my pages. 4) Write the code changes for my stack as a reviewable diff, behind a setting I can switch off. 5) Give me a test checklist I can run only against my own site. Don't deploy anything or touch any site I don't own; show me every change first.
Open in ChatGPT Open in Claude Perplexity Download as agent skill (SKILL.md)

Fill in the blanks, then copy

This prompt has 1 [bracket] to fill in. Type your details below and the prompt updates as you go. Your answers stay in this browser and are reused on other prompts with the same blanks. Nothing is sent to us.

How to use it

  1. Copy the prompt above.
  2. Replace every [bracket] with your own details (use the fill-in-the-blanks box above, which remembers your answers for the next prompt).
  3. Paste it into Claude Code, Cursor, Codex and review the answer before you use it.

Works with: Claude Code, Cursor, Codex, Cloudflare Workers

Real-world example: x.com/illyism/status/2115357045264425386

Before you use it: what to check

Already built into this prompt

Check yourself

Using an AI agent? Download this prompt as a SKILL.md agent skill with these checks built in, or get the .zip for Claude.ai. How to install skills.

Share:Post on XLinkedInFacebookRedditWhatsApp
</> Embed this prompt on your site

Paste this HTML into your blog or website. It's a plain card with no tracking scripts that links back to this prompt.

Want to make this prompt even better? Grade it with the free prompt grader or build your own with the AI prompt generator.

Get the free Solo Founder Stack pack

32 copy-paste agent prompts (PDF) plus 5 new prompts every week.

Get it free

More Security prompts

Draft a malware reverse-engineering briefMalware analysis · intermediateDecide which accounts your AI agent may log into and which actions still need your OK, before you hand over any passwordsAgent login permissions · beginner · worked exampleRun a 15-minute personal security checkup: let an AI interview you about your email, bank, phone and connected AI agents, then hand you a ranked fix listPersonal account security audit · beginnerTake the server your AI agent runs on off the public internet: put it behind Tailscale or a Cloudflare Tunnel so only you can reach itAgent server lockdown · intermediateKeep the computer your AI agents run on patched every morning: one bot watches for new security advisories, another checks what's installed, applies only verified small updates and holds anything bigger for your OKPatch management · intermediateHunt for security bugs like a team: give Claude Code a playbook built from 700+ real disclosed reports, and only test targets you're authorized to testBug bounty & testing · advanced

See all Security prompts →