TagsGenFree Tag & SEO Tools

Robots txt Generator

Build a robots.txt file with sitemap and bot rules.

Robots.txt Generator

Build a robots.txt file with sitemap and bot rules. Free, private, no sign-up.
robots.txt

Put the file at the root of your domain, for example example.com/robots.txt. Robots.txt asks crawlers not to visit pages. It does not hide a page from search results by itself; use a noindex tag for that.

How to use the Robots.txt Generator

  1. Choose the default: allow all crawlers or block all.
  2. Add folders to block, such as /wp-admin/, one per line.
  3. Add the full URL of your sitemap.
  4. Download the file and upload it to the root of your site, so it opens at yoursite.com/robots.txt.

What robots.txt can and cannot do

  • It tells crawlers which URLs they may crawl. It is mainly for managing crawl traffic.
  • It is not a way to keep a page out of Google. A blocked page can still be indexed if other pages link to it. Use a noindex tag for that.
  • The file must be at the root of the host and be named robots.txt.
  • Rules are case-sensitive.

Do not block the CSS and JavaScript files your pages need. Google renders pages, and blocked files can make a page look broken to it.

The rules you will use most

LineWhat it does
User-agent: *Applies the rules below to all crawlers
Disallow: /path/Asks crawlers not to fetch that folder
Allow: /path/fileMakes an exception inside a disallowed folder
Sitemap: full URLTells crawlers where your XML sitemap is

Google also understands two wildcards: an asterisk matches any characters and a dollar sign marks the end of a URL. Use them carefully, because one wrong pattern can block far more than you intended.

Example for a typical WordPress site

Most WordPress sites need very little: allow everything, keep the admin area out except the AJAX file that themes and plugins use, and list the sitemap. Internal search result pages are a common extra block, because they create endless thin URLs. The generator builds this kind of file in a few clicks, and you can adjust each line before copying it.

Mistakes to avoid

  • Blocking CSS or JavaScript. Google needs them to render your pages properly.
  • Using robots.txt to hide a page from search. A blocked page can still be indexed from links, without a description. Use a noindex robots meta tag instead, and leave the page crawlable so Google can see it.
  • Leaving a staging rule live. A single Disallow: / line blocks the whole site. Check after every launch or migration.
  • Relying on Crawl-delay for Google. Google ignores that line.

How to test your file

  1. Upload the file to the root of your domain so it opens at yourdomain.com/robots.txt.
  2. Open that address in a browser and confirm the text is exactly what you expect.
  3. In Google Search Console, check the robots.txt report for fetch errors.
  4. Use URL Inspection on an important page to confirm it is not blocked.

Google reads up to 500 kibibytes of a robots.txt file, which is far more than any normal site needs. Learn more in our guides to SEO tags and the meta tag generator, which can add a noindex tag where you need one. Build a sitemap aware setup alongside the schema markup generator for structured data.

robots.txt and AI crawlers

Some AI companies publish user agent names for their crawlers and say they follow robots.txt. If you want to allow or block a specific crawler, add a separate User-agent group with its exact name from that company’s documentation. Rules only work for crawlers that choose to follow them, so robots.txt is a request, not a lock.

Frequently Asked Questions

Should I block /wp-admin/ in WordPress?
Many sites do, with an Allow rule for /wp-admin/admin-ajax.php. WordPress already adds that pair to its default virtual robots.txt.
How do I hide a page from Google?
Add a noindex robots meta tag and let Google crawl the page so it can see the tag. Do not block it in robots.txt at the same time.
Where does robots.txt go?

In the root folder of your domain, so it opens at yourdomain.com/robots.txt. Files in subfolders are ignored.

Does robots.txt stop a page from being indexed?

Not reliably. It stops crawling, but a blocked URL can still appear in results. Use a noindex meta tag on a crawlable page to keep it out.

Do I need a robots.txt file at all?

No. Without one, crawlers may fetch everything. A small file is still useful to point to your sitemap.

Sources

Checked November 2026. Platforms change their rules, so check the linked page if a number looks different in your app.