Skip to the tool
OnPageKit

Robots.txt Validator

Validate robots.txt and test whether a URL is blocked.

open /robots.txt, select all, paste

The file is read in this tab. Nothing is fetched and nothing is uploaded.

Allowed: /

Allowed: no group applies to Googlebot, and there is no User-agent: * group to fall back on.

Groups
0
Rules
0
Errors
0
Warnings
0
  • The file has no directives. An empty robots.txt — like a missing one — lets every crawler fetch everything.

Everything runs in your browser. Nothing you type is sent to a server.

Found a bug in this tool? Report it.

Share this tool

What this tool does

This robots.txt validator reads the file you paste line by line, the way a crawler does, and reports every line that a crawler would skip or misread: lines with no colon, misspelled directives, rules that sit above any User-agent, groups that end up with no rules, sitemaps written as relative paths, and directives that Google stopped honouring years ago.

It is also a robots.txt tester. Type a user-agent and a URL or path, and it tells you whether that crawler may fetch it, which line decided, and which group was used. That answers the question behind most searches for "is my URL blocked by robots.txt" without waiting for a search console report to refresh.

How to use it

  1. Open https://your-site.com/robots.txt, select everything and paste it into the box. A draft you have not deployed yet works just as well.
  2. Read the findings, which are sorted by line. Errors are lines no crawler will obey; warnings are lines that probably do not do what you think; notes are there to confirm intent.
  3. Enter a crawler name such as Googlebot, Bingbot or GPTBot, then a full URL or a path. The verdict updates as you type.

How crawlers actually read the file

RFC 9309, published in 2022, finally turned the 1994 convention into a standard, and it settles most of the arguments this robots.txt syntax checker is built around.

Groups. A group starts with one or more consecutive User-agent lines and continues with the Allow and Disallow lines under it. Two User-agent lines in a row share the rules that follow. A Disallow before any User-agent belongs to nobody. Blank lines do not end a group, which is why a stray User-agent line with nothing under it can quietly swallow the rules you meant for someone else.

Choosing a group. A crawler looks for the group that names it, case-insensitively. Google adds one step: a crawler such as Googlebot-Image with no group of its own falls back to the Googlebot group before it falls back to *. Only one group applies. If several groups name the same crawler, they are merged into one.

Choosing a rule. Within that group, the rule whose path matches and is longest wins. A tie between Allow and Disallow of the same length goes to Allow. Paths are prefixes: /admin also matches /admin-tools and /administrator, so add the trailing slash when you mean the directory. The only wildcards are *, which matches any run of characters, and $, which anchors the end of the URL and only means that when it is the last character.

What is always allowed. /robots.txt itself can always be fetched, and a missing or empty file allows everything. Google reads at most the first 500 KiB, and the validator warns if you paste more than that.

Mistakes worth checking for

The costly ones are rarely syntax errors. They are a Disallow: / left over from staging, a Googlebot group added for one rule that silently exempts Google from everything under *, or a CSS and JavaScript directory blocked so Google renders a broken page. Test a few of your real templates, not only the paths you meant to block.

If you are writing the file from scratch, the robots.txt generator builds one from presets. To keep a crawlable page out of the index, use the meta robots tag generator instead of a Disallow, and list the pages you do want found with the sitemap generator.

Frequently asked questions

Why paste the file instead of entering my domain?

A page in your browser cannot fetch another site's robots.txt: the same-origin policy blocks it unless that site sends CORS headers, and almost none do for robots.txt. Taking a domain would mean a server fetching on your behalf. Pasting keeps the check in this tab, and it also lets you validate a draft before it goes live, which is when a mistake is cheapest.

Is an empty Disallow the same as Disallow: /?

No, they are opposites. Disallow with nothing after the colon matches no URL, so it allows everything. Disallow: / matches every path on the host, so it blocks the whole site. The validator flags both so you can confirm which one you meant.

Which rule wins when Allow and Disallow both match a URL?

Under RFC 9309 the rule with the longest path wins, regardless of the order the lines appear in. If an Allow and a Disallow are exactly the same length, Allow wins. Older crawlers that read rules top to bottom may disagree, which is a good reason not to depend on ties.

Does blocking a URL in robots.txt remove it from Google?

No. robots.txt controls crawling, not indexing. A blocked URL can still be indexed from links pointing at it, shown with no description. To keep a page out of results, let it be crawled and serve a noindex meta tag or X-Robots-Tag header.

Why does the tester pick the Googlebot group and ignore the * group?

A crawler obeys only the most specific group that names it. Once a group for Googlebot exists, the rules under User-agent: * no longer apply to Googlebot at all, so anything you blocked for everyone has to be repeated in the Googlebot group too. This is the most common surprise in real robots.txt files.

Related tools

Updated