Robots.txt
free/v1/domain/robotsFetches and parses the robots.txt file to extract crawler rules, disallowed paths, and sitemap references. Reveals what content is hidden from search engines.
What It Does
Retrieves robots.txt from the domain root and parses it per RFC 9309 (the Robots Exclusion Protocol standard). Extracts User-agent blocks, Allow/Disallow rules, sitemap references, and crawl-delay directives. Highlights commonly interesting disallowed paths (admin panels, APIs, etc.).
Why It's Useful
Robots.txt often reveals hidden directories, admin panels, and API endpoints that aren't linked publicly. For SEO, it helps verify that important pages aren't accidentally blocked from search engines.
Use Cases
Security Reconnaissance
Discover hidden paths and admin interfaces listed in Disallow rules.
Find additional attack surface not discoverable through crawling.
SEO Troubleshooting
Diagnose why certain pages aren't appearing in search results by checking robots.txt blocks.
Fix accidental search engine blocks hurting organic traffic.
Crawler Configuration
Verify robots.txt is properly configured before deploying to production.
Prevent accidental blocking of important pages from search engines.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | The domain to fetch robots.txt fromExample: example.com |
Response Fields
| Field | Type | Description |
|---|---|---|
domain | string | The queried domain |
exists | boolean | Whether robots.txt exists |
fileSize | number | File size in bytes (null if not found) |
rules | array | Parsed rules by user-agent (userAgent, allow, disallow, crawlDelay) |
sitemaps | array | Sitemap URLs referenced |
interestingPaths | array | Security-interesting disallowed paths (admin, login, API, etc.) |
totalRules | number | Total number of user-agent rule groups |
totalDisallowedPaths | number | Total number of disallowed paths across all rules |
score | number | Robots.txt health score (0-100) |
grade | string | Letter grade (A-F) based on score |
scoreDetails | array | Breakdown of scoring factors |
recommendations | array | Actionable suggestions to improve robots.txt |
Code Examples
curl "https://api.edgedns.dev/v1/domain/robots" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "domain=example.com"const response = await fetch(
'https://api.edgedns.dev/v1/domain/robots?domain=example.com',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);import requests
response = requests.get(
'https://api.edgedns.dev/v1/domain/robots',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'domain': 'example.com'
}
)
data = response.json()
print(data)Read the full Robots.txt guide
Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.