Robots.txt Generator

Build a valid robots.txt file with custom allow/disallow rules and a sitemap reference.

Back to SEO Tools

Generate robots.txt

Website URL Sitemap URL Rules
Preview

      

About the Robots.txt Generator

A correctly formatted robots.txt tells search engines what they can and can't crawl. Robots.txt Generator builds one with a live preview, so you can see exactly what you're about to publish before you copy or download it.

Features

How to Use

Enter your website URL and sitemap URL, add Allow/Disallow rules as needed, then copy the generated text or download it directly as robots.txt.

Benefits

How robots.txt works

A robots.txt file sits at the root of your site (for example example.com/robots.txt) and gives crawlers instructions. User-agent names the crawler, Disallow blocks a path, Allow permits a path inside a blocked area, and Sitemap points crawlers to your sitemap. The generator assembles these lines for you and previews the exact text before you copy it.

Mistakes that can hurt your site

  • Blocking everything: Disallow: / under all user agents stops search engines crawling the whole site.
  • Blocking CSS or JavaScript: search engines need these files to render pages properly.
  • Using robots.txt to hide pages: a blocked URL can still appear in results if other sites link to it. To keep a page out of search, use a noindex meta tag instead, and leave the page crawlable so the tag can be read.
  • Wrong location: the file only works at the root of the domain, in plain text.

Good practice and next steps

For most sites a simple file is enough: allow everything, block admin or private areas, and list your sitemap. Review it after redesigns or migrations, because old rules often linger. Test the final file in your search console, and make sure the sitemap URL is the clean, canonical address of the sitemap. The Meta Tag Generator builds the page-level tags, including robots directives, and the Keyword Density Checker helps with on-page text. Nothing is sent to a server when you generate the file.

Frequently Asked Questions

Where do I put the downloaded file?
robots.txt must be placed at the root of your domain, e.g. yoursite.com/robots.txt, for search engines to find it.

What happens if I don't add any rules?
With no rules, the generator defaults to allowing all crawling — a safe, common default for most sites.

How is this different from WordPress or Shopify's built-in robots.txt?
WordPress and Shopify both generate a basic robots.txt automatically, but customizing it usually means editing a theme file, installing an SEO plugin, or (on Shopify) adding a separate robots.txt.liquid template — this tool builds the same Allow/Disallow/Sitemap syntax with a live preview, then you upload or paste the result wherever your platform expects it.

Related Tools