robots.txt tester
ayrank_robots_txt_testTest a URL against a site's robots.txt for a specified user agent to see if crawling is allowed; returns the deciding rule and lines that do not affect the result.
Instructions
Use to test one URL against the site's robots.txt for one user agent (RFC 9309: named group else *, longest match, Allow wins a tie). Returns allowed, the deciding line and lines that decide nothing. Not for meta robots or X-Robots-Tag (use ayrank_http_headers or ayrank_ai_overview_eligibility), and it does not write a robots.txt (use ayrank_robots_txt_generate).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "ayrank_robots_txt_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The page to test, like https://example.com/blog/post. Path and query are matched. | |
| userAgent | No | robots.txt product token. Default Googlebot. Presets: Googlebot, Bingbot, GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot, PerplexityBot, Google-Extended, Applebot-Extended, CCBot. |