In asp.net, c# web applciation, is it possible to prevent bots from accessing a particular page?
I want to prevent all bots from accessing the payment page on my site.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t.
You can request that the bots don’t visit your site (see Projapati’s answer for more details on how to do that), or certain directories, or certain files; but it’s really just a request. As long as ‘Joe Schmoe User’ can open a browser and see the page; nothing prevents someone from automating that visit.
You could try to do something where you block certain IPs that you know are used by various bots/crawlers; but it’d be a losing proposition. You could never say, with any certainty, that it wasn’t a bot visiting the page.
Or you could modify the site so that only authenticated users can access that particular page and hope that nobody goes through the trouble of setting up a fake account to use.