فارسی

Build robots.txt and Check the Rules

Build Allow and Disallow rules with a form, or paste a robots.txt and see whether a bot may crawl a path. Wildcards, sitemaps and common mistakes are covered.

Use this tool in your browser without installing software.

About this tool

robots.txt tells crawlers which parts of a site not to read. The file is made of groups: one or more User-agent lines followed by Allow or Disallow rules. A group can target every bot (User-agent: *) or one named bot. When several rules match a path, the one with the longer pattern wins; if two patterns are the same length, Allow wins. A star (*) matches any run of characters and a trailing $ locks the end of the path, so Disallow: /*.pdf$ blocks PDF files only. Sitemap is a global directive, not part of a group. This page builds the file with a form, reads an existing file, checks its rules, and says whether a given path is open or blocked for a given bot. Everything runs in your browser and the file is not sent anywhere.

How to use it

  1. 1

    In “Build”, enter a User-agent (or * for everyone) and add Allow and Disallow rules.

  2. 2

    Add Crawl-delay and a Sitemap address if you need them; the file is built as you type.

  3. 3

    To test it, switch to “Check”, bring the builder output over, enter a path and a bot, and see whether it is open or blocked.

Frequently asked questions

What is robots.txt and what does it do?

It is a plain text file at the root of a site that marks paths crawlers should not read. Use it to guide crawlers, not to protect private pages or guarantee removal from search results.

What is the difference between Allow and Disallow?

Disallow closes a path and Allow opens it again. Because the longer rule wins, you can block a whole folder and reopen one subfolder: Disallow: /private and Allow: /private/public, for example.

What do the star and the $ sign do?

A star matches any run of characters and a trailing $ locks the end of the path. For example, Disallow: /*.pdf$ blocks addresses that end in .pdf but not /file.pdf?download=1. Matching is case-sensitive.

Why is a shorter rule not taking effect?

When several rules match a path, the longest pattern wins. If two patterns are the same length, Allow wins. That is deliberate so you can add precise exceptions; the Check mode shows which rule actually applied.

Is my file sent or stored anywhere?

No. Building and checking happen in your browser and no request is sent to a server. You put the file at the root of your site yourself, for example https://example.com/robots.txt.