Skip to content

5. Practical curl observations

About 1 min read · reviewed 2026-11-26

5. Practical curl observations

Use these only for public URLs you are authorized to inspect, after checking site rules and robots. The commands below save one page and its headers; they do not crawl an entire site or follow redirects automatically.

curl --fail-with-body --max-time 20 \
  --user-agent 'BacklinkResearchBot/1.0' \
  --dump-header response_headers.txt \
  --output response_page.html \
  'https://example.org/public-page'

rg -n -i 'location:|x-robots-tag:|content-type:' response_headers.txt
rg -n -i 'rel=|canonical|name=.?(robots|googlebot|bingbot)' response_page.html

Replace the illustrative URL. Review a Location value and the next host's rules before following it. Search matches are hints; a string can occur inside script text rather than a real anchor. Use the parser or browser to confirm. curl -I is convenient for a HEAD request, but sites may respond differently to GET, which is why the example uses GET.