On my Drupal 7 site I have some pages that should not be entered by bots like the google bot or any other bot. All this pages are under a specific path like:


I have configured my robots.txt to prevent all bots to enter xyz/* but I would like to add a higher obstacle. I thought, for example, about a capture.

I there a way in Drupal 7 to restrict access to all pages that have an specific path by a capture or does anybody have a better idea how to achieve my goal?

  • Your question doesn't make clear the reasons for restricting bot access (keeping information from search engines? preventing spam form submissions? reducing server load?). It's hard to recommend approaches without knowing both the reason for restricting bot access and the type of bot activity you're facing. Oct 18, 2014 at 9:14

1 Answer 1


It sounds like you want to guard against robots that ignore robots.txt. Or possibly against spambots that are trying to exploit your comments section. I think the easiest way is to not allow anonymous users access to the page. Then, if you protect the login page with captcha, you should be able to keep any bots where you want them.

You will need the Content Access module and the Captcha module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.