Robots.txt Validator
Validate a robots.txt file in your browser. Paste your robots.txt and get instant syntax checks — unknown or misspelled directives, rules placed before any User-agent, invalid Sitemap URLs, bad crawl-delay values, and more — each reported with its line number.
The Robots.txt Validator checks your robots.txt file for syntax problems before you ship it. Paste the contents of your robots.txt and it scans every line for errors and warnings — unknown or misspelled directives, rules placed before any User-agent group, paths that don't start with a slash, non-numeric crawl-delay values, and Sitemap entries that aren't absolute URLs — and reports each issue with its exact line number. Everything runs in your browser; nothing is uploaded.
What does a robots.txt validator check?
A robots.txt validator parses your file the way a crawler would and flags anything that breaks the Robots Exclusion Protocol or is likely to be ignored. This validator reports errors (lines that are malformed or in the wrong place) and warnings (lines that are technically parsable but probably not what you intended), so you can fix problems before search engines or AI crawlers read the file.
- Unknown or misspelled directives, such as 'Disalow' instead of 'Disallow', with a suggested correction.
- Disallow, Allow or Crawl-delay rules that appear before any User-agent line and therefore belong to no group.
- Missing colons, empty User-agent names, and empty directive names.
- Crawl-delay values that aren't a non-negative number.
- Sitemap directives that are empty or use a relative path instead of a full https:// URL.
How to validate your robots.txt
Paste the file and validate it in three steps.
- Copy the contents of your live robots.txt (usually at https://yourdomain.com/robots.txt) or the draft you're editing.
- Paste it into the box and click Validate, or click Load sample to see how problems are reported.
- Review the line-numbered errors and warnings, fix them in your source file, and re-validate until it reports no problems.
Errors vs. warnings
Errors are lines a compliant parser can't act on — a missing colon, an unknown directive, a rule that belongs to no User-agent group, or a Sitemap that isn't an absolute URL. These should always be fixed. Warnings are lines that parse but look suspicious, such as a Disallow path that doesn't start with '/' or a file with no User-agent directive at all. Warnings are worth reviewing even if crawlers tolerate them, because they often signal a typo or a rule that won't do what you expect.
Common robots.txt mistakes
The most frequent problems are ordering and URL issues. Crawlers read robots.txt as a series of groups, each beginning with one or more User-agent lines followed by that group's rules — putting a Disallow before the first User-agent leaves it attached to nothing. Sitemap directives are global and must be absolute URLs (https://example.com/sitemap.xml), not paths like /sitemap.xml. Remember that robots.txt controls crawling, not indexing: a Disallow line stops well-behaved crawlers from fetching a URL but does not guarantee the page stays out of search results.
Why use this robots.txt validator?
- Line-numbered errors and warnings so you can jump straight to each problem in your source file.
- Catches misspelled directives like 'Disalow' or 'Useragent' and suggests the correct spelling.
- Flags rules placed before any User-agent group, the single most common robots.txt mistake.
- Validates Sitemap directives as absolute URLs and checks Crawl-delay is a valid number.
- Runs entirely in your browser — your robots.txt is never uploaded or stored anywhere.
Frequently asked questions
What makes a robots.txt file invalid?
The Robots Exclusion Protocol is forgiving, so most files 'work' even with mistakes — but a directive with no colon, an unknown directive, a rule before the first User-agent, or a relative Sitemap URL will be misread or ignored by crawlers. This validator flags exactly those cases so the rules you wrote actually take effect.
Does the order of directives matter?
Yes. robots.txt is read as a series of groups, each starting with one or more User-agent lines followed by that group's Disallow, Allow and Crawl-delay rules. Rules only apply to the User-agent group above them, so a Disallow placed before any User-agent line belongs to no group and is ignored. The validator warns when rules appear before a User-agent.
Why does the Sitemap have to be a full URL?
Unlike Disallow and Allow, which take URL paths, the Sitemap directive requires an absolute URL including the scheme and domain, for example https://example.com/sitemap.xml. A relative value like /sitemap.xml is invalid and won't be picked up, so the validator flags any Sitemap that doesn't start with http:// or https://.
Does this tool test whether a specific URL is blocked?
No. This is a syntax validator — it checks that your robots.txt is well-formed and points out errors and warnings line by line. It does not simulate how a particular crawler would match a given URL against your rules. Use it to make sure the file is correct, then test specific URLs with your search engine's robots.txt tester.
Is the robots.txt validator free and private?
Yes. It is completely free and runs entirely in your browser with JavaScript. The robots.txt you paste is parsed locally on your device and is never uploaded, logged, or stored.