Robots.txt Generator

Create a robots.txt file with the rules you choose, including allowed and blocked paths, crawl delay and your sitemap location.

User-agent: *
Allow: /
Did this tool help? Rate it Be the first to rate this tool

What robots.txt controls - and what it doesn't

A robots.txt file tells well-behaved search engine crawlers which parts of your site they're allowed to request. That's all it does. It is a crawling instruction, not an indexing or ranking control - blocking a URL in robots.txt does not reliably remove it from search results, because a page can still get indexed (sometimes with no snippet) if other sites link to it. If your actual goal is to keep a specific page out of Google entirely, you need a noindex meta tag or HTTP header on that page instead, not a robots.txt rule.

How this generator builds the file

Choose "Allow all robots" (the sensible default for almost every site) and optionally list specific paths to block underneath - admin areas, cart pages, internal search result URLs, or anything else you don't want crawled. Choose "Disallow all robots" only if you genuinely want to block every crawler from the entire site, which is rare and usually only appropriate for a staging environment. Add your sitemap URL and it's appended automatically, which helps crawlers discover your sitemap without needing to find it independently.

Where the finished file has to live

robots.txt only works from one exact location: the root of your domain, reachable at https://example.com/robots.txt. A copy placed in a subfolder is simply ignored by every major crawler - there is no alternate location that works.

What robots.txt controls

A robots.txt file sits at the root of your site and tells crawlers which areas they may visit. It is a request, not a lock: well-behaved bots follow it, but it does not hide pages from people and it does not secure private content. Use real access controls for anything sensitive.

Rules worth knowing

Use User-agent to name a crawler and Disallow or Allow to set paths. Add a Sitemap line so crawlers can find your sitemap quickly. Do not block CSS or JavaScript files that pages need to render, and remember that a blocked page can still appear in results if other sites link to it.

Test before you publish

A single wrong line can block your whole site, so test the file with Search Console's tools and fetch /robots.txt in a browser after uploading. Re-check it after migrations, redesigns or plugin changes.

Basic structure

A file contains groups starting with User-agent followed by Allow or Disallow lines, and an optional Sitemap line. For example, User-agent: * and Disallow: /admin/ block all crawlers from the admin folder. Place the file at the root of your domain.

Remember

Robots.txt controls crawling, not indexing. A blocked page can still appear in results if other sites link to it, so use noindex for removal. Do not block CSS or JavaScript that Google needs to render the page, and test changes in Search Console.

Robots.txt basics

  • The file must sit at the root of the domain.
  • Robots.txt controls crawling, not indexing. A blocked URL can still appear if linked elsewhere.
  • Never block CSS or JavaScript that pages need to render.
  • Add your sitemap line and test changes before going live.

Related tools

XML Sitemap Generator, AI Bot Robots.txt Configurator, Search Engine Spider Simulator.

Frequently asked questions

Does robots.txt stop a page from appearing in Google?

Not reliably. Blocking a URL in robots.txt only stops crawling of that URL - it can still appear in search results (sometimes without a snippet) if other pages link to it. Use a noindex meta tag or HTTP header to actually keep a page out of search results.

Where exactly does the generated file need to be uploaded?

It must be saved as robots.txt in the root directory of your domain, so it's reachable at yourdomain.com/robots.txt - a copy anywhere else is ignored by crawlers.

Should I disallow all robots on a live site?

Almost never. Blocking every crawler from your entire live site stops search engines from indexing any of it. "Disallow all" is normally only appropriate for a staging or development site that shouldn't be found at all.

Why add a Sitemap line to robots.txt?

Listing your sitemap URL in robots.txt gives crawlers an easy, standard way to discover it, which can help them find and crawl your pages more efficiently - though it isn't the only way to submit a sitemap.

Can I block specific crawlers like Googlebot individually instead of all robots at once?

robots.txt does support per-crawler rules using different User-agent lines, but this generator focuses on the common case of one ruleset for all robots (User-agent: *), which covers the vast majority of real-world needs.

Does robots.txt remove pages from Google?

No. Use a noindex tag or removal tools. Blocking crawling can even stop Google seeing the noindex tag.

Where must the file be placed?

At the root of the host, for example example.com/robots.txt. Each subdomain needs its own file.

Should I block AI crawlers?

That is your choice. You can add specific user-agent rules for the crawlers you want to allow or disallow.

Does robots.txt keep a page out of Google?

Not reliably. Use a noindex tag or authentication for pages that must not appear.

Can a wrong robots.txt hurt my site?

Yes. A rule like "Disallow: /" can block crawling of the whole site, so test it.

More in Technical SEO & Site Management