<configuration>
[...]
<system.webServer>
[...]
<security>
<requestFiltering>
<filteringRules>
<filteringRule name="Block Bots and Crawlers" scanUrl="false" scanQueryString="false">
<scanHeaders>
<add requestHeader="User-Agent" />
</scanHeaders>
<denyStrings>
<add string="facebookexternalhit" /> <!-- Block Facebook crawler DDoS -->
<add string="GPTBot" /> <!-- Block OpenAI GPT crawler -->
</denyStrings>
</filteringRule>
</filteringRules>
</requestFiltering>
</security>
</system.webServer>
</configuration> |