Robots.txt Generator

Start with a preset

Sitemap
Yoast and Rank Math use /sitemap_index.xml. WordPress without a plugin uses /wp-sitemap.xml.
Rules for all search engines (User-agent: *)
Use * as a wildcard and $ to match the end of a URL. Example: /*.pdf$ Google ignores crawl-delay. Bing and Yandex respect it.
Block AI crawlers
Blocking these stops AI companies from using your content for training. It won’t affect your Google rankings.
Block SEO tool bots
These bots use server resources and let competitors see your backlinks. Blocking them is optional.

Your robots.txt

    Test a URL

    How to use the Robots.txt Generator

    1. Pick a preset. WordPress is a safe choice for most sites.
    2. Add your website and sitemap URL.
    3. Tick any extra folders or bots you want to block.
    4. Use Test a URL to check that important pages are still allowed.
    5. Copy or download the file and upload it to the root of your site, so it opens at yoursite.com/robots.txt.

    In WordPress, you can edit robots.txt with Yoast SEO (Yoast SEO → Tools → File editor) or Rank Math (General Settings → Edit robots.txt), without using FTP.

    What is a robots.txt file?

    robots.txt is a small text file that tells search engine bots which parts of your site they can and can’t crawl. Good bots like Googlebot and Bingbot read it before crawling. It helps them spend their time on your important pages instead of admin areas, search results and filter pages.

    Common robots.txt mistakes

    • Blocking the whole site by accident with Disallow: /, often left over from a staging site.
    • Blocking CSS and JavaScript (like /wp-includes/), which stops Google from rendering your pages properly.
    • Using robots.txt to hide pages from Google. Blocked pages can still be indexed if other sites link to them. Use a noindex tag instead.
    • Forgetting the sitemap line, which helps search engines find all your pages.

    Made by Maroof Ahmed. More free tools: SERP Snippet Preview, Keyword Density Checker, Heading Structure Checker, URL Slug Generator and Schema Markup Generator. Need help with your SEO? Chat on WhatsApp.

    Want an expert to do this for you?

    I’m Maroof Ahmed, a freelance SEO consultant with 300+ projects for businesses in the USA, UK and Australia. Technical SEO services →