Free tool

Robots.txt generator

Build a robots.txt file, test any address against it and block AI crawlers in one tap. Free, no account, and nothing leaves your browser.

Start from

Sitemaps

No problems found.

Test an address

Type an address to see if the crawler may open it.

Where does the file go?

Optional. It fills in the address and checks your sitemap.

It must sit at the very top of the site. Each subdomain, like blog.example.com, needs its own file.

Your website runs on

WordPress makes a basic robots.txt for you. To use yours, upload a file named robots.txt to your site's main folder with your host's file manager or FTP. A real file replaces the built-in one. SEO plugins like Yoast also have a place to edit it.

Import a robots.txt

Runs in your browser. Nothing you type is sent to Postfjord or saved.

You share a link to your new blog post, and the preview card shows up blank. Or a client asks how to stop AI companies from copying their site. Both start with one small text file called robots.txt. This tool writes it for you, then checks it before you upload it.

How to use the generator

  1. Pick a starting point: Allow everything, Block everything, Block AI training, Block all AI bots or WordPress. You can undo it.
  2. Each group has crawler names and rules. Use * for every crawler, or tap Add a crawler to pick one by name. A short note says what each one is.
  3. Add rules. Each rule allows or blocks a path, like /private/. Block a common path adds the usual ones, like your cart or checkout.
  4. Open Sitemaps to list the address of your sitemap. Open Crawl delay if you want to slow a crawler down.
  5. Your file updates as you type. Read the Checks under it, then press Download robots.txt or Copy file. On a phone the button says Save or share.
  6. Open Where does the file go? to type your website, see the exact address to upload to, and get a short hint for WordPress, Shopify, Squarespace and Wix.

Already have a file? Open Import a robots.txt, paste it or choose it, and press Read this file. You see what it blocks, and any line that does not work is listed with its line number.

To test a rule, type an address or a path under Test an address. You get Allowed or Blocked, the group that was used, and every rule that matched.

Where robots.txt comes from

Search engines send small programs called crawlers to read websites. Site owners have used a plain text file to tell crawlers where not to go for decades. In 2022 the rules became an official standard, called RFC 9309. A robots.txt file lives at the top of your site, like example.com/robots.txt. Crawlers look for it first.

Where a wrong line bites

The classic one is a single line: Disallow: /. It means block everything. Developers use it while a new site is being built, and then it goes live with the site. Weeks later the traffic is gone and nobody knows why.

The second one is the block that blocks nothing. Say you block /old-offer/ to hide a page. A page you block can still show up in Google as a bare link, because other sites link to it. Robots.txt stops crawling. It does not remove a page. To keep a page out of search, put a noindex tag on it and let crawlers read the page.

What the generator does and does not do

It writes the five lines that robots.txt knows: User-agent, Allow, Disallow, Sitemap and Crawl-delay. The tester follows RFC 9309. A path matches when it starts with the rule. A * stands for any run of characters, and a $ at the end means the path must end there. When two rules match, the longer one wins, and Allow wins a tie. Google's own parser follows the same rules. A crawler uses the group with its own name, or the * group if it has none.

It does not make anyone obey. Robots.txt is a request. Good crawlers follow it. A bad one can ignore it, so never use it to hide private pages. Use a password for that. It also does not look at your live site, because a page in your browser cannot read another site's files. Paste your file into the importer instead. Google reads only the first 500 KiB of a file, so keep yours short. Comments in an imported file are not kept.

On social media

You cannot edit robots.txt on Instagram, TikTok or YouTube. Each platform owns its own. The file matters for your own website, and for what happens when you share it.

When you post a link on Facebook, X, LinkedIn or Pinterest, they open your page to build the preview card. Their crawlers are named facebookexternalhit (Meta), Twitterbot (X), LinkedInBot and Pinterestbot. Block them, or block the whole site, and your link can show up without a picture or title. The checks warn you when you do that.

For AI, you can ask training crawlers like GPTBot, ClaudeBot and CCBot to stay away. The preset Block AI training does that and leaves search engines alone. It does not change what an AI already learned. It only asks crawlers that visit your site from now on.

FAQ

What is a robots.txt file?

A robots.txt file is a plain text file at the top of your website that tells crawlers which pages they may visit. It lists a crawler name, then the paths it may or may not open. Search engines read it before they read the rest of your site.

Where do I put my robots.txt file?

Put it at the root of your site, so it opens at yourwebsite.com/robots.txt. The name must be robots.txt in lower case. A file in a subfolder is ignored, and each subdomain, like blog.yourwebsite.com, needs its own file.

How do I block AI crawlers like GPTBot?

Add a group for each AI crawler and give it the rule Disallow: /. Use the Block AI training preset to add GPTBot, ClaudeBot, CCBot, Google-Extended, Applebot-Extended and Meta-ExternalAgent at once. Search engines keep working. Only crawlers that follow robots.txt will stop.

Does robots.txt hide a page from Google?

No. It asks Google not to crawl the page, but Google can still list the address if other sites link to it. To keep a page out of results, add a noindex tag and do not block the page in robots.txt, so Google can read the tag.

Does Google use Crawl-delay?

No. Google ignores the Crawl-delay line. Bing and some other crawlers read it. The generator writes it if you add one and warns you when Google is the crawler.

What happens if my robots.txt has a mistake?

A crawler skips the lines it cannot read and follows the rest, so one bad line seldom breaks the file. A wrong path is the bigger risk: a rule like /Private/ does not match /private/, because paths are case sensitive. Test the address in the tester before you upload.

More free tools

All 101 tools

Plan your posts in one place

Postfjord schedules your posts to your channels from one calendar, so the links you share point to a site that works. Try it free.

Start free