<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 -->
<add string="GPTBotmeta-externalagent" /> <!-- Block OpenAI GPT crawlerMeta/facebook -->
<add string="OAI-SearchBotGPTBot" /> <!-- Block OpenAI GPT crawler -->
<add string="metaOAI-externalagentSearchBot" /> <!-- Meta/facebook Block OpenAI GPT crawler -->
</denyStrings>
</filteringRule>
</filteringRules>
</requestFiltering>
</security>
</system.webServer>
</configuration> |