Free Robots.txt Generator & Tester

Tell search engines where to go and where to stay out. Pick your platform, add your sitemap, choose which AI crawlers to block, and get a clean robots.txt file you can copy or download in one click.

Build your file

Start with a preset, then change anything you like. The file on the right updates as you type.

Your website platform
Use the full address, starting with https://. Bots read this line first and find your pages faster.
Google ignores this rule. Bing, Yandex and some other bots respect it.
Block these paths (Disallow)
Allow these paths (exceptions)
robots.txt 0 lines

Test a URL against your rules

Type any path from your site to see if Googlebot may crawl it.

How to add robots.txt to your website

The file must live at the root of your domain, like yoursite.com/robots.txt. Anywhere else, bots will not find it.

  1. Build the file

    Choose a preset above and add your sitemap URL and any private folders.

  2. Test key pages

    Use the tester to make sure your home, blog and product pages are still allowed.

  3. Upload it

    Put it in public_html. On WordPress, Rank Math or Yoast let you edit it from the dashboard.

  4. Check in Search Console

    Open the robots.txt report in Google Search Console to confirm Google fetched the new version.

Every robots.txt rule, in plain English

A robots.txt file is a short list of instructions. Here is what each line means and when to use it.

RuleWhat it doesExample
User-agentNames the bot the next rules are for. A star means every bot.User-agent: *
DisallowAsks the bot not to crawl a folder or page.Disallow: /cart/
AllowMakes an exception inside a blocked folder. The longer, more specific rule wins.Allow: /wp-admin/admin-ajax.php
SitemapPoints bots to your XML sitemap. Must be a full URL.Sitemap: https://site.com/sitemap.xml
Crawl-delayAsks a bot to wait between requests. Google ignores it.Crawl-delay: 10
* and $Wildcards. * matches anything, $ marks the end of a URL.Disallow: /*.pdf$

Robots.txt mistakes I see in real audits

In 10 years of SEO audits, these four problems come up again and again. Each one can quietly cost you traffic.

Leaving “Disallow: /” after launch

Developers block the whole site on staging and forget to remove it. Google then stops crawling everything.

Blocking CSS and JavaScript

If Google cannot load your theme files, it sees a broken page. Never block /wp-content/ or /wp-includes/.

Using robots.txt to hide pages

A blocked page can still appear in Google if other sites link to it. Use a noindex tag to remove a page.

No sitemap line

One line costs nothing and helps every search engine find your new pages faster.

Remember: Disallow stops crawling, not indexing. To remove a page from Google, add <meta name="robots" content="noindex"> and keep the page crawlable so Google can see that tag.

Frequently asked questions

Does every website need a robots.txt file?

No, but it helps. Without one, bots crawl everything they find. A simple file keeps them out of login pages, carts and search results, and points them to your sitemap.

Will blocking AI bots hurt my Google rankings?

No. Bots like GPTBot, CCBot and ClaudeBot are separate from Googlebot. Google-Extended only controls whether Google uses your content for Gemini training, not your search rankings.

How do I edit robots.txt in WordPress?

WordPress makes a virtual file by default. In Rank Math go to General Settings, then Edit robots.txt. In Yoast use Tools, then File editor. You can also upload a real file to public_html.

Can I edit robots.txt on Shopify?

Yes. Shopify makes a default file, and you can change it with a robots.txt.liquid template in your theme code. Only change it if you know why, as Shopify’s defaults are already good.

How long does Google take to see my new robots.txt?

Google usually caches the file for up to 24 hours. You can ask for a faster recrawl from the robots.txt report in Google Search Console.

Not sure what Google can see on your site?

I’ll check your robots.txt, sitemap, indexing and crawl budget, and send you a clear list of fixes. No jargon, no cost.