Free Tool

WordPress Robots.txt Generator

Free robots.txt generator for WordPress. Create a properly formatted robots.txt file with rules for Googlebot, Bingbot, and other crawlers. Block wp-admin, plugins, and sensitive directories.

What is robots.txt?

The robots.txt file tells search engine crawlers which pages and directories on your website they can and cannot access. It sits in your site's root directory (e.g., yoursite.com/robots.txt) and is the first file bots check before crawling.

For WordPress sites, a properly configured robots.txt prevents search engines from indexing admin pages, login screens, and other sensitive areas — improving both security and crawl efficiency.

WordPress Robots.txt Best Practices

  • Block /wp-admin/ but allow /wp-admin/admin-ajax.php (needed by many plugins)
  • Block /wp-includes/ — core files shouldn't be indexed
  • Block search result pages (?s= queries) to prevent thin content indexing
  • Include your sitemap URL — helps crawlers find all your important pages
  • Block AI scrapers like GPTBot and CCBot if you don't want your content used for AI training

Frequently Asked Questions

Where do I put the robots.txt file in WordPress?

Upload it to your WordPress root directory (usually public_html/ or www/). You can also manage it through SEO plugins like Rank Math or Yoast SEO without FTP access.

Does robots.txt block pages from Google?

Robots.txt tells crawlers not to crawl those URLs, but it doesn't guarantee they won't be indexed. If other sites link to a blocked URL, Google may still index it. To fully prevent indexing, use a "noindex" meta tag instead.

Should I block /wp-content/uploads/ in robots.txt?

Generally no. Your uploads directory contains product images and media that you want indexed in Google Images. Only block it if you have sensitive files stored there.

How do I test my robots.txt?

Use Google Search Console's robots.txt Tester (under Crawl settings) to verify your rules are working correctly and not accidentally blocking important pages.

Was this tool helpful?
Share this tool