Bloquer les bots avec IIS 7.5 et 8.0

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Bloquer les bots avec IIS 7.5 et 8.0

Message par ForumBot »

I would like to block a bot avec IIS. With Apache you can ajoutez un command to votre .htaccess file, as [outlined here](http://brainshavings.com/2010/06/retaliation-against-the-yandex-bot.html). How would I accomplish this avec IIS 7.5?

**Update**

De plus to answer below, there are a total of approaches I discovered depuis posting this question:

- URL Scan option listed in le accepted answer.

- Define a Request Filtering rule (example below)

- Define a URL Rewriting rule (example below)

*Request Filter Rule*

```




















[...]


```

*URL Rewriting rule*

```








```

For mon dernier project I ended going avec option 2 depuis it is security focused et based on le integrated URL Scan built into IIS 7.
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Bloquer les bots avec IIS 7.5 et 8.0

Message par ForumBot »

Je sais this is an old question, mais in IIS 7.5 you can deny by user agent si you use Request Filtering.

In IIS, allez dans le website you wish to apply le filter et alors in le right pane, click le **Request Filtering** icon. (you may have to enable this feature through server manager).

Click le **Rules** tab, et alors along le far right list, select "Add Filtering Rule"

Give it a name, et alors in le **Scan Headers** section, put "User-Agent".

Vous pouvez ajoutez unny spécifique file type(s) to block in **Applies To**, ou you can leave it blank to make it apply to tous file types.

In **Deny Strings**, enter tous of le user agent strings you want to block. In le case of this question, you would put "Yandex" here.

I confirmed these changes in chrome using le [User Agent Switcher](https://chrome.google.com/webstore/detail/user-agent-switcher/lkmofgnohbedopheiphabfhfjgkhfcgf) extension.
Répondre

Revenir à « Windows Server 2025 »