100% free SEO + AEO + GEO tools · No sign-up · Live audit results Run Full Audit →

Free Robots.txt Generator & Tester

Use this free robots.txt generator & tester to control crawl access, block bad bots and protect staging environments.

Paths that crawlers should be allowed to access (optional).
Paths you want to block from crawling (e.g. admin, thank-you pages).
Paste the full URL of your XML sitemap so crawlers can find it easily.
📄 Click to upload or drag & drop File content will fill the field above

Generating…

Your robots.txt


    

What It Does

Builds a robots.txt file from your Allow rules, Disallow rules and sitemap address, then flags risky settings such as blocking the whole site.

What is robots.txt?

robots.txt is a plain-text file placed at the root of your website (e.g. https://yoursite.com/robots.txt). It tells search-engine crawlers which parts of the site they may or may not request. It is not a security mechanism—malicious bots can ignore it—but legitimate crawlers such as Googlebot respect it.

Primary purpose

Manage crawl budget, hide non-public sections, and point crawlers to your sitemap.

Important limit

robots.txt prevents crawling, not indexing. A blocked URL can still appear in search if linked from elsewhere.

Where it lives

Must be at the domain root over HTTP/HTTPS. Subfolder robots.txt files are ignored.

Best practices

  • Never block CSS, JS or image assets that Google needs to render the page.
  • Do not use robots.txt to hide private pages that contain sensitive data—use authentication instead.
  • Keep the file small and readable; comments start with #.
  • After changes, request a recrawl in Search Console if critical pages were previously blocked.

How to Use It

  1. List any paths you want explicitly allowed (rarely needed unless you also block broader paths).
  2. List paths to disallow—admin areas, cart, checkout, internal search results, staging folders, etc.
  3. Optionally paste your sitemap URL.
  4. Generate, then Copy or Download the file and upload it as /robots.txt.
  5. Test with Google Search Console’s robots.txt tester.

Worked Example

Input

Allow: /
Disallow: /wp-admin/
Sitemap: https://example.com/wp-sitemap.xml

What you get

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

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

FAQs

Can I block an entire site?
Yes: User-agent: * Disallow: /. Use this only for staging or development environments, never on a live site you want indexed.
Does robots.txt stop Google from indexing a page?
No. To prevent indexing use a noindex meta tag or X-Robots-Tag header while allowing the page to be crawled.
How long until changes take effect?
Crawlers cache robots.txt for up to a day or more. You can request a fresh fetch in Google Search Console.