SEO Tools

Robots.txt Generator

Build a correct robots.txt with allow/disallow rules, crawl delay and a sitemap reference.

Tool

About the Robots.txt Generator

The Robots.txt Generator runs entirely in your browser — your URLs and content never leave your machine. Fill in the fields, click generate, copy the result.

robots.txt is the first file every crawler reads when it visits your site. One wrong line — usually Disallow: / at the top — can de-index your entire site. This generator builds the file with correct ordering (allow beats disallow for Google when rules are otherwise equal), validates your paths and appends your sitemap reference.

How to use this tool

  1. Pick the user-agent the rules apply to — * means everyone.
  2. List paths to allow and disallow, one per line. Trailing slashes matter.
  3. Paste your sitemap URL — always include it, it costs nothing.
  4. Copy the output to /robots.txt at your site root.

Common mistakes

MistakeResult
Disallow: /Whole site excluded — the classic outage
Blocking CSS/JS foldersGoogle cannot render the page, rankings drop
No sitemap lineLost discovery speed for new pages
Trying to block AI bots here onlyBots may ignore robots.txt — combine with server-level rules

Allow vs. disallow precedence

Google uses the most specific rule: a longer matching path wins; on equal length, Allow wins. So Disallow: /wp-admin/ + Allow: /wp-admin/admin-ajax.php works exactly as intended. Bing follows similar logic; smaller bots may not — keep rules simple.

Note that robots.txt prevents crawling, not indexing. A page linked elsewhere can still appear in Google without being crawled — for that you need noindex in the page's meta tags.

Who is this tool for?

Site admins deploying a first robots.txt, SEOs auditing crawl budget on large sites, and developers blocking AI scrapers from a whole directory.

SEO tip

Test the file after deploying: Google Search Console → Settings → robots.txt, or just open yourdomain.com/robots.txt in a browser and read it back.

Frequently asked questions

At the domain root: https://example.com/robots.txt. It must be plain text with no HTML wrapper.
It is a voluntary protocol — polite crawlers obey it, malicious ones ignore it. For legal refusal you need server blocking or a license like robots.txt's AI-training variant.
Yes: Disallow that exact path — but remember it blocks crawling, not indexing. Use noindex meta tag to actually remove a page from search.

Related tools

Guides for this tool