skip to Main Content

Asp.net – IIS Rewrite Module exclude bots but allow GoogleBot

I'm using the following IIS Rewrite Rule to block as many bots as possible. <rule name="BotBlock" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_USER_AGENT}" pattern="^$|bot|crawl|spider" /> </conditions> <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> </rule> This rule blocks all requests with an…

VIEW QUESTION
Back To Top
Search