↑ ↓ select, Enter open, Esc close

Fetch robots.txt and show the Disallow rules

Adjust the values, the command updates live
user@server
curl -s https://example.com/robots.txt | grep -iE '^\s*(user-agent|disallow|allow|sitemap):'

Fetches robots.txt and filters out comments and empty lines. This quickly shows whether a Disallow: / from the development phase was accidentally left in place and whether the sitemap is listed. The URL must end with a slash.

Note: On WordPress without a physical file, WordPress generates robots.txt dynamically. curl -sI {{URL}}robots.txt checks the status code, and a 5xx there can stop crawling entirely.

Also searched as

  • check robots.txt disallow rules
  • what does robots.txt block
  • is my site blocked for google
  • show robots.txt command line

Related one-liners

All in SEO checks

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.