> For the complete documentation index, see [llms.txt](https://docs.stopbot.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stopbot.net/v2/settings-guides/blacklist/useragent.md).

# Useragent

Use Blacklist Useragent to block traffic by exact user agent value or keyword pattern.

### Marked Screenshot

<figure><img src="/files/83SU0EYQPp6dzaFP2HIx" alt=""><figcaption></figcaption></figure>

| Marker | Control          | What It Does                                        |
| ------ | ---------------- | --------------------------------------------------- |
| 1      | IP Address       | Enter one or more IP values.                        |
| 2      | Hostname         | Enter the hostname value.                           |
| 3      | Useragent        | Open or control this panel item.                    |
| 4      | Guide            | Open the related service guide.                     |
| 5      | User-Agent Type  | Select exact user-agent or keyword mode.            |
| 6      | User-Agent Value | Enter the user-agent or keyword value.              |
| 7      | Add User-Agent   | Add the user-agent rule to the list.                |
| 8      | Remove All       | Remove all records in this list after confirmation. |

### Add Blacklist Useragent

The Add Blacklist Useragent form includes:

| Field               | Description                              |
| ------------------- | ---------------------------------------- |
| Type                | User agent rule type                     |
| User-Agent or Value | Exact user agent string or keyword value |

### Supported Types And Examples

| Type    | Single Example    | Bulk Example               | Use It For                                           |
| ------- | ----------------- | -------------------------- | ---------------------------------------------------- |
| SINGLE  | `curl/8.5.0`      | `curl/8.5.0,Wget/1.21.4`   | Blocking exact user agent values                     |
| KEYWORD | `python-requests` | `python-requests,headless` | Blocking user agents that contain a specific keyword |

Example SINGLE value:

```
curl/8.5.0
```

Example KEYWORD value:

```
python-requests
```

Use KEYWORD only when the keyword is specific enough to avoid blocking normal browsers.

### Example Scenarios

| Scenario                                       | Type    | Value Example              |
| ---------------------------------------------- | ------- | -------------------------- |
| Block one exact automation user agent          | SINGLE  | `curl/8.5.0`               |
| Block two exact automation user agents at once | SINGLE  | `curl/8.5.0,Wget/1.21.4`   |
| Block clients containing a clear library name  | KEYWORD | `python-requests`          |
| Block multiple automation keywords at once     | KEYWORD | `python-requests,headless` |

### How To Add

1. Open Settings > Blacklist > Useragent.
2. Choose SINGLE or KEYWORD.
3. Enter the user agent value or keyword.
4. Click Add.
5. Review the Blacklist Useragent List.

### Blacklist Useragent List

| Column    | Description                         |
| --------- | ----------------------------------- |
| Date Time | Time when the rule was created      |
| Type      | Rule type                           |
| Value     | Blocked user agent value or keyword |
| Action    | Edit or remove the rule             |

### Best Practices

* Prefer SINGLE for precise blocking.
* Use KEYWORD only for clear automation signatures.
* Avoid broad keywords such as `Mozilla`, `Chrome`, or `Safari` because they can match normal browsers.
* Review visitor logs after adding a user agent rule.

### Related Pages

| Page                                                                        | Purpose                                          |
| --------------------------------------------------------------------------- | ------------------------------------------------ |
| [Blocker](https://docs.stopbot.net/v2/panel-guides/services/blocker)        | Review visitor user agents in logs               |
| [Blocker V2](https://docs.stopbot.net/v2/panel-guides/services/blocker-v2)  | Use advanced filtering with user agent decisions |
| [Recent Logs](https://docs.stopbot.net/v2/panel-guides/account/recent-logs) | Review recent user agent activity                |
