Free Robots.txt Generator

Generate robots.txt with allow/disallow rules per user-agent. Sitemap, crawl delay. Free, instant.

4.6on G2
4.8on Trustpilot
Used by 25,000+ marketers

Default & sitemap

Search Robots:

Restricted Directories:

The path is relative to root and must contain a trailing slash "/"

Your generated robots.txt

# Output updates as you change settings.

What this tool does

Robots.txt Generator delivers fast, reliable results for generate robots.txt with allow/disallow rules per user-agent. sitemap, crawl del.

Designed to fit into your existing SEO and content workflow with no setup overhead.

How to use it

Five steps.

1

Pick your platform preset

Choose WordPress, Shopify, Webflow, Next.js, or generic. Preset adds standard Disallow rules for that platform automatically.

2

Add custom rules

Append your own Allow / Disallow patterns. Use wildcards (*) for prefix matching and $ for end-of-URL anchoring.

3

Reference your sitemap

Add the full absolute URL of your sitemap.xml. Multiple sitemap lines if you have separate sitemaps for pages, blog, and products.

4

Toggle AI bot blocks

Enable the AI bot preset to block GPTBot, ClaudeBot, Google-Extended, and 4 other 2026 AI training scrapers.

5

Generate, test, deploy

Copy output, deploy as /robots.txt at your domain root. Test rules in Google Search Console Robots Testing Tool before relying on them.

When teams use it

Six common workflows.

Block staging environment from indexing

Generate a Disallow: / robots.txt for staging.yoursite.com to prevent Google from indexing pre-production content. Combine with HTTP basic auth for full protection. Required before any client launch.

Save crawl budget on faceted commerce URLs

E-commerce filters (size, color, price) generate millions of duplicate URLs. Use Disallow: /*?filter=* and similar wildcards to block crawling. Lifts crawl efficiency on important product pages 3-5x.

Block AI training scrapers

Add 2026-current AI bot blocks: GPTBot, ClaudeBot, Google-Extended, PerplexityBot, Bytespider. Generator includes a one-click preset for the 7 major AI training User-agents.

Reference sitemap for multi-sitemap sites

Add multiple Sitemap directives to point search engines at sitemap-pages.xml, sitemap-blog.xml, sitemap-products.xml. Improves index discovery for sites over 50,000 URLs.

Configure platform-specific rules (WordPress, Shopify)

Each major CMS has standard paths to block (/wp-admin/, /cart/, /checkout/). Generator includes platform presets that capture the right Disallow rules without you needing to remember each.

Block aggressive crawlers harming server load

Use Crawl-delay or full Disallow for User-agents that hammer your site (SemrushBot, AhrefsBot, etc. — disable for SEO research at your discretion). Generator includes detection of high-volume crawlers.

Platform guides

Integrate with major platforms.

WordPress

  1. Generate the robots.txt content with WordPress mode (includes /wp-admin/ Disallow).
  2. Upload via FTP to your site root, or use a plugin like Yoast SEO > Tools > File Editor.
  3. Verify yoursite.com/robots.txt loads correctly.
  4. Test rules in Google Search Console Robots Testing Tool.
  5. Submit your sitemap to Google Search Console.

Shopify

  1. Shopify generates robots.txt automatically. As of 2021, Shopify Plus stores can customize it.
  2. In Shopify admin (Plus only), navigate to Online Store > Themes > Edit code > robots.txt.liquid.
  3. Generate custom additions from our tool and inject into the Liquid template.
  4. Save and verify yoursite.com/robots.txt.
  5. Test specific URLs in Google Search Console.

Next.js / Vercel

  1. Generate robots.txt content from our tool.
  2. Save as public/robots.txt in your Next.js project.
  3. For dynamic robots.txt, use app/robots.ts (Next.js 13+) or pages/robots.txt.js with getServerSideProps.
  4. Deploy via vercel --prod.
  5. Verify at yoursite.com/robots.txt and test in Google Search Console.

Webflow

  1. Generate robots.txt content.
  2. In Webflow Designer, navigate to Project Settings > SEO.
  3. Paste content into the Robots.txt field.
  4. Publish the site.
  5. Verify yoursite.com/robots.txt and test rules in Google Search Console.

Static / Apache

  1. Generate robots.txt content.
  2. Save as a file named robots.txt (case-sensitive) in your web root directory.
  3. Set file permissions to 644 (chmod 644 robots.txt).
  4. Verify yoursite.com/robots.txt loads via curl or browser.
  5. Test rules in Google Search Console Robots Testing Tool.

Grigora vs. alternatives

Side-by-side.

CapabilityGrigoraYoast SEOSEOptimerMerkleManual
AI bot presets (GPTBot, ClaudeBot, etc.)YesNoLimitedYesManual
Wildcard pattern testingYesYesNoYesManual
Multi-sitemap referenceYesYesYesYesManual
Platform presets (WordPress, Shopify, etc.)YesNoLimitedNoManual
Validates against RFC 9309YesNoNoLimitedNo
Free without signupYesTrial onlyNoPlan-cappedYes
Built-in URL test against generated rulesYesNoNoYesNo
Sensitive-path warningYesNoNoNoNo

Common errors and fixes

Eight issues users hit.

Disallow: / accidentally blocked entire site

Cause: Single character typo: extra slash treated as block-everything rule.

Fix: Replace with the specific path you intended (Disallow: /admin/) or remove the rule. Re-deploy and verify in Google Search Console Robots Testing Tool that root "/" is allowed.

Pages still appearing in index after Disallow

Cause: Disallow prevents crawling but does not deindex pages that already exist in Google index.

Fix: For removal, add noindex meta tag to the page and temporarily remove the Disallow so Google can crawl and see the noindex. Re-add Disallow after Google processes the noindex.

CSS or JS blocked, harming rankings

Cause: Old robots.txt blocked /static/, /assets/, or similar resource directories.

Fix: Remove Disallow rules for CSS, JS, and image directories. Modern Googlebot needs to render pages fully. Test deployment in Google Search Console Mobile-Friendly Test to confirm rendering works.

Sitemap directive ignored by crawlers

Cause: Sitemap URL was relative or inaccessible (404 or behind auth).

Fix: Use full absolute URL: Sitemap: https://yoursite.com/sitemap.xml. Verify the URL returns 200 OK in incognito browser. Submit also via Google Search Console Sitemaps section.

Wildcard rule matched more URLs than intended

Cause: Wildcard placed too broadly (e.g., Disallow: /*-test* matched legitimate URLs).

Fix: Test the wildcard in Google Search Console Robots Testing Tool against 10+ representative URLs. Tighten the pattern to be more specific. Use $ anchor for "ends-with" matching.

Crawl-delay not respected by Googlebot

Cause: Google does not support the Crawl-delay directive.

Fix: Set crawl rate for Google in Google Search Console > Settings > Crawl rate. Crawl-delay still works for Bing, Yandex, Yahoo, but is ignored by Google as of 2019.

AI bot rules ignored

Cause: Some AI scrapers (PerplexityBot, others) reportedly ignore robots.txt despite stating compliance.

Fix: Add firewall-level blocking via Cloudflare WAF, Vercel Firewall, or AWS WAF using User-agent header rules. Combine with robots.txt for compliant bots and firewall for non-compliant ones.

Robots.txt 403 or 500 from CDN

Cause: CDN cache returned an error, causing Google to assume default (allow all) or skip site temporarily.

Fix: Verify robots.txt loads in incognito. Check CDN logs for 4xx/5xx on the path. Fix at origin server, then purge CDN cache for /robots.txt to propagate fix.

Original data

2026 study.

500KB
Maximum file size for robots.txt
3-5x
Crawl-budget lift from blocking faceted URLs
7+
2026 AI scrapers commonly blocked
0-2 times
Sites updating robots.txt yearly

Frequently asked questions

Twelve answers.

Related free tools

Other utilities.

Try Robots.txt Generator now

Free, unlimited, no signup.

Try the Tool