robotparser behavior on 403 (Forbidden) robot.txt files

J

John Nagle

I just discovered that the "robotparser" module interprets
a 403 ("Forbidden") status on a "robots.txt" file as meaning
"all access disallowed". That's unexpected behavior.

A major site ("http://www.aplus.net/robot.txt") has their
"robots.txt" file set up that way.

There's no real "robots.txt" standard, unfortunately.
So it's not definitively a bug.

John Nagle
SiteTruth
 
M

Martin v. Löwis

I just discovered that the "robotparser" module interprets
a 403 ("Forbidden") status on a "robots.txt" file as meaning
"all access disallowed". That's unexpected behavior.

That's specified in the "norobots RFC":

http://www.robotstxt.org/norobots-rfc.txt

- On server response indicating access restrictions (HTTP Status
Code 401 or 403) a robot should regard access to the site
completely restricted.

So if a site returns 403, we should assume that it did so
deliberately, and doesn't want to be indexed.
A major site ("http://www.aplus.net/robot.txt") has their
"robots.txt" file set up that way.

You should try "http://www.aplus.net/robots.txt" instead,
which can be accessed just fine.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top