is it possible to remove a bingbot from accessing my website?

163 views Asked by At

I appear to have a bingbot accessing a couple of my pages on my website that send out emails to employees. It will access the page at random times and it triggers the email being sent out over and over again.

Most of the pages on the website check for user authentication but these email pages don't. I'm sure if I made these pages also check authentication it would stop sending the emails, but is there a way to get this thing to stop attempting to access my website all together? Will the bot ever stop on its own?

thanks.

1

There are 1 answers

0
Quentin On

Search engine bots will make requests to your site using GET requests.

Look at the HTTP documentation:

4.2.1. Safe Methods

Request methods are considered "safe" if their defined semantics are essentially read-only; i.e., the client does not request, and does not expect, any state change on the origin server as a result of applying a safe method to a target resource. Likewise, reasonable use of a safe method is not expected to cause any harm, loss of property, or unusual burden on the origin server.

and

Of the request methods defined by this specification, the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe.

You are sending an email in response to a GET request, which violates this rule.

Change your system so the email is only sent if the URL is requested with, for example, a POST method (and change the bits of your system which interact with it so they use POST instead of GET).