↑ ↓ select, Enter open, Esc close

Check the X-Robots-Tag header of a URL

Adjust the values, the command updates live
user@server
curl -s -o /dev/null -D - https://example.com/ | grep -i '^x-robots-tag'

Requests the URL via GET and shows only the X-Robots-Tag header. It works like a meta robots tag, but lives in the HTTP header and is therefore easily overlooked when checking the page source. Also important for PDFs and images, which have no HTML head.

Note: No output means no such header is set. Typical sources are Header set X-Robots-Tag in .htaccess, add_header in nginx, and staging plugins.

Also searched as

  • noindex in http header
  • why is my page not indexed
  • check pdf for noindex
  • show x-robots-tag header curl

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.