SEO Tools

Free robots.txt Builder

Build a robots.txt file for static sites, including sitemap location, crawl access, and optional AI crawler notes.

Loading tool...

What is robots.txt Builder?

A robots.txt file gives crawlers site-level access rules. It can allow or disallow paths, point to the sitemap, and document crawler policies. Static sites often need a small, predictable robots.txt file because build outputs and GitHub Pages deployments only publish what exists in the final folder.

quickAnswer

Use robots.txt to tell crawlers which parts of your site they should not access. It controls crawl traffic, not indexing -- directives like noindex belong in meta tags or HTTP headers.

Last updated: 2026-05-25

limitations

  • robots.txt directives are advisory. Bad actors and some AI crawlers may ignore them entirely.
  • Blocking a page in robots.txt does not prevent indexing if other pages link to it. Use noindex meta tags or HTTP headers to prevent indexing.
  • Each subdomain needs its own robots.txt file. The file at example.com/robots.txt does not apply to subdomain.example.com.

Sources:MDN Web Docs · W3C Specifications · jquery.app on GitHub

How to use this tool

  1. Enter the public site URL and sitemap URL.
  2. Choose whether normal crawlers should be allowed across the site.
  3. Add disallowed paths only when there is a real reason to block crawling.
  4. Copy the result into robots.txt at the published site root.

What you can use it for

  • Create a clean robots.txt file for GitHub Pages.
  • Add a sitemap reference without hand-writing the file.
  • Document public crawler access before launch.

Use cases

Practical examples

example

Static site launch

A new static site needs to allow crawling and point search engines to the sitemap. The builder creates a minimal file with the final sitemap URL.

example

Block generated utility folders

A site can disallow temporary export paths while keeping public pages and tools open to crawlers.

Common mistakes

  • Blocking important pages and expecting them to rank.
  • Using robots.txt to remove a page that is already indexed instead of using noindex or removal tools.
  • Forgetting to publish robots.txt into the final build output.

verification

  1. Test the generated robots.txt using Google Search Console robots.txt Tester tool.
  2. Verify the file is served from the site root with a 200 status code and Content-Type: text/plain.

comparison

robots.txt vs meta robots vs X-Robots-Tag

Aspectrobots.txtmeta robotsX-Robots-Tag
ScopeSite-wide or directory-levelPer-page onlyPer-page or per-file type via HTTP response
Which crawlers read itAll compliant crawlers. Bad actors may ignore it.All compliant crawlers. Same compliance model as robots.txt.All compliant crawlers. Read from the HTTP header regardless of file type.
Available directivesallow, disallow, sitemap, crawl-delayindex, noindex, follow, nofollow, noarchive, nosnippet, max-snippet, max-image-preview, noimageindexSame directives as meta robots plus noindex and nofollow for non-HTML files such as PDFs and images
Use casesPrevent crawling of admin areas, staging directories, or search pagesPrevent indexing of a specific thank-you page or thin content pageBlock indexing of PDFs, images, or other non-HTML resources served from the same domain

robots.txt controls crawl access at the site level, meta robots controls indexing per HTML page, and X-Robots-Tag offers the same per-page control as meta robots but works for any file type via the HTTP response header.

FAQ

Questions about robots.txt Builder

Can robots.txt force a page out of Google?

No. It controls crawling. For indexing decisions, use page-level noindex when crawlers can access the page.

Should I add a sitemap line?

Yes. A Sitemap line gives crawlers a stable path to the site's canonical URL list.

Should I block AI crawlers by default?

That is a policy choice. If AI visibility matters, avoid blocking crawlers unless you have a clear business or privacy reason.

Should I use a different robots.txt for staging and production?

Yes. A staging or development site should block all crawlers with Disallow: / to prevent duplicate content issues and accidental indexing of in-progress pages. The production robots.txt should be permissive enough to allow crawling of pages you want indexed. Use separate robots.txt files or generate them conditionally during the build process based on the deployment environment.

Related tools

More seo tools

Seo

AI Crawler robots.txt Builder

Build a robots.txt policy for AI crawlers. Choose from open, selective, or strict presets and block specific AI training bots while allowing search engines.

Open tool

Also try

Also try

Html

ARIA Live Region Generator

Generate accessible ARIA live region HTML snippets with role, aria-live, aria-atomic, and aria-relevant attributes. Includes optional JavaScript update function.

Open tool

Html

CSP Hash Generator

Generate CSP hash values for inline scripts and styles. Hash exact code content with SHA-256, SHA-384, or SHA-512 and get the matching CSP directive snippet.

Open tool