Robots.txt Generator

Create a correct robots.txt file for your website, with WordPress presets, your sitemap and optional AI crawler blocking.

Bilal KhizriFree tool by Bilal Khizri · No sign-up · Works on mobile
💡 In simple words: Robots.txt is a small text file on your website that tells search engine robots which pages they may visit and which to skip, like a “staff only” sign on a door. This tool writes the file for you so you don’t accidentally block Google from your important pages.
AI crawlers

Ticked bots will be blocked. Blocking AI bots does not affect your Google rankings.

How to use the robots.txt generator

  1. Enter your sitemap URL. Rank Math uses /sitemap_index.xml, and Yoast uses /sitemap_index.xml too.
  2. Choose a preset. WordPress is the safe choice for most sites.
  3. Add any extra folders you want to block and tick any AI crawlers you want to block.
  4. Download the file and upload it to the root of your website, or paste it into the robots.txt editor in Rank Math (General Settings › Edit robots.txt).

What is robots.txt?

Robots.txt is a plain text file at yourdomain.com/robots.txt. It gives instructions to crawlers like Googlebot about which parts of your site they should not crawl. It is the first file most bots check when they visit.

Common robots.txt mistakes

Should I block AI crawlers?

That is a business choice. Blocking bots like GPTBot stops your content being used to train AI models, but it may also reduce how often AI assistants mention or link to your business. Blocking AI bots does not affect your Google search rankings.

After uploading, check your site with our Website Audit Tool.

Frequently Asked Questions

Where do I put robots.txt?

In the root folder of your domain, so it opens at https://yourdomain.com/robots.txt. It will not work in a subfolder.

Does robots.txt stop pages appearing in Google?

Not reliably. It stops crawling, not indexing. To keep a page out of Google, use a noindex meta tag and allow crawling.

What is a good robots.txt for WordPress?

Block /wp-admin/ but allow /wp-admin/admin-ajax.php, block internal search pages, and add your sitemap. That is exactly what the WordPress preset does.

Does Google follow Crawl-delay?

No. Google ignores Crawl-delay, though Bing and some other bots respect it.

Related Free Tools