Join the waitlist
Launch & Technical ChecksWorkflow check

Robots.txt Generator

Free robots.txt generator: build Allow/Disallow rules for Googlebot and AI crawlers, add CMS starter paths and your sitemap, then copy a clean file — no signup.

Free robots.txt generator — no signup. Output is crawl rules only; it does not authenticate users or hide secrets.

User-agent + Allow/Disallow rows

# Generated by serpvi robots.txt generator — review before publishing.
# robots.txt manages crawl access; it is not authentication or secrecy control.

User-agent: *
Allow: /
Disallow: /admin/
Disallow: /drafts/

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

Next step after running this check

Runs locally in your browser with zero pasted content sent to SerpVI servers.

Generate a robots.txt file

A robots.txt generator turns path policy into a root file crawlers fetch before they request URLs. Google's robots.txt introduction is explicit: the file manages crawl access. It is not a reliable way to keep a URL out of search results, and it is not authentication. Use the builder above for live preview, then publish at https://{host}/robots.txt on the host users actually hit.

AI crawler presets (GPTBot, ClaudeBot, and peers)

One-click AI packs insert named User-agent groups for GPTBot, ChatGPT-User, OAI-SearchBot, ClaudeBot, Google-Extended, Bytespider, and PerplexityBot. That matches what serious free generators ship in 2026 — without a suite signup wall. Tokens change; confirm the current name in each vendor's docs before you ship a block. Matching is by the published string; serpvi does not IP-validate crawler identity on this free tool (first-party bot scoring elsewhere is also UA-based).

TokenTypical intentCommon patternKeep separate from
GPTBotOpenAI crawl / training-related fetchDisallow: / to opt out sitewideChatGPT-User / OAI-SearchBot
ClaudeBotAnthropic crawlerNamed Allow/Disallow group* / Googlebot
Google-ExtendedGoogle AI / Gemini training controlBlock Extended; leave Googlebot openGooglebot
Bytespider / PerplexityBotByteDance / Perplexity crawlersNamed Disallow if you opt outSearch crawlers you still want

Worked clinic — block training-style AI crawls, keep user/search OpenAI fetches, leave Googlebot on *:

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

User-agent: GPTBot
Disallow: /

User-agent: ChatGPT-User
Allow: /

User-agent: OAI-SearchBot
Allow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: Bytespider
Disallow: /

User-agent: PerplexityBot
Disallow: /

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

CMS starter templates

WordPress and Shopify-ish templates prefill the soft-URL paths most sites should keep out of the crawl queue (admin, cart, noisy query strings) while leaving the public catalog open. Treat them as drafts: remove anything your theme already handles, and never paste a staging Disallow: / into production.

TemplateTypical DisallowsSitemap hintReview before ship
WordPress/wp-admin/ (with ajax Allow), /wp-includes/, search query, /wp-json//wp-sitemap.xmlPlugin SEO packs may already emit robots — avoid conflicting files
Shopify-ish/admin, /cart, /checkout, preview query junk/sitemap.xmlConfirm theme/app routes you still need crawled
User-agent: *
Allow: /
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-includes/
Disallow: /?*s=
Disallow: /wp-json/

User-agent: GPTBot
Disallow: /

User-agent: Google-Extended
Disallow: /

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

How to generate a robots.txt file (step-by-step)

  1. Decide which paths should not burn crawl budget (admin, drafts, faceted junk) vs which must stay open.
  2. Build rows per User-agent — or load a CMS template — then apply an AI pack if you have a training-crawl policy.
  3. Add an absolute Sitemap: URL (protocol + host). Relative sitemap lines are a common silent miss.
  4. Copy or download the same text the preview shows; deploy to the site root on the canonical host.
  5. Validate with the live robots.txt checker and spot-check money URLs under Googlebot.

Robots.txt syntax basics (Allow vs Disallow, Sitemap)

Per How Google interprets robots.txt and RFC 9309: paths are case-sensitive and should start with /; longer matching paths beat shorter ones; on a length tie, Allow wins over Disallow; empty Disallow: is treated as allow-all for that line; Sitemap takes a fully qualified URL and is not tied to a single User-agent. Google documents only User-agent, Allow, Disallow, and Sitemap as supported fields — Crawl-delay is ignored by Googlebot.

SituationWhat to writeWhat Googlebot does
Block a folder, keep a public subpathDisallow: /admin/ + Allow: /admin/public/Longer /admin/public/ wins for that URL
Opt out one AI crawler onlyNamed User-agent: GPTBot + Disallow: /Googlebot still follows * (if open)
Point crawlers at XML sitemapsSitemap: https://example.com/sitemap.xmlDiscovery hint — still verify the sitemap file itself
Need the URL out of resultsDo not rely on Disallow aloneUse noindex (crawlable) or auth — see Google's block indexing guidance

Pre-launch diagnostic checklist

Where this fits next to search traffic

Crawl rules and click quality are related but not the same signal. Generate the file here, validate with the robots.txt checker, confirm sitemap URLs in the sitemap checker, and use how serpvi works plus connected data sources when you want Search Console coverage next to session drops on sites you connect. Browse other free SEO tools, including the SERP preview and UTM builder. For LLM-oriented summary files (not crawl rules), see the llms.txt generator.

Related tools

Questions

How to generate a robots.txt file?
Add User-agent groups with Allow/Disallow paths in the generator above (or start from a WordPress / Shopify-ish template), optionally set AI crawler packs, add an absolute Sitemap URL, then copy or download the file. Publish it at https://your-host/robots.txt — the same host users and crawlers hit — and re-check with a robots.txt checker after deploy.
Is robots.txt legal?
The Robots Exclusion Protocol is a voluntary convention (now also RFC 9309), not a statute that forces every client to obey. Reputable crawlers honor it; scrapers may ignore it. Disallow is not a substitute for authentication, paywalls, or access control.
Is robots.txt still used?
Yes. Google still fetches and caches robots.txt and documents User-agent, Allow, Disallow, and Sitemap. Named AI crawlers that publish a token (GPTBot, ClaudeBot, Google-Extended, and others) also read it. Treat it as crawl management, not as a way to keep URLs out of search results.
Is bypassing robots.txt illegal?
Whether ignoring robots.txt is unlawful depends on jurisdiction, contract terms, and what the scraper does with the data — robots.txt itself is not a criminal statute. Practically: never rely on Disallow to protect private apps; use login and server-side authorization.
How do I add robots.txt to my site root?
Serve a UTF-8 text file at the site root path /robots.txt on the exact host in the URL bar (www vs apex often differ). Static hosts: drop the file in the public root. CMS: use the theme/plugin robots setting or map the route. Confirm with a browser GET and Search Console’s robots tester when available.
Does Disallow hide a page from Google Search?
No. Google may still index a disallowed URL if other sites link to it, usually without a snippet. To keep a URL out of results, use noindex (and allow crawl so Google can see the tag) or require authentication. Pair this generator with a noindex checker when indexation — not crawl — is the goal.
Should I block GPTBot and Googlebot the same way?
Usually not. Googlebot controls Search crawl; GPTBot / Google-Extended / ClaudeBot are separate tokens for AI-related crawling. Use named User-agent groups so you can Disallow training crawlers while leaving Googlebot on your * rules.