> 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/hostname.md).

# Hostname

Hostname rules are useful when unwanted traffic repeatedly comes from a known host, cloud provider hostname pattern, or suspicious reverse DNS value.

### Marked Screenshot

<figure><img src="/files/kU88z0ImuDG3biuiO7u6" 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      | Hostname Type | Select exact hostname or wildcard hostname type.    |
| 6      | Hostname      | Enter the hostname value.                           |
| 7      | Add Hostname  | Add the hostname rule to the list.                  |
| 8      | Remove All    | Remove all records in this list after confirmation. |

### Add Blacklist Hostname

The Add Blacklist Hostname form includes:

| Field    | Description                           |
| -------- | ------------------------------------- |
| Type     | Hostname rule type                    |
| Hostname | Hostname or wildcard hostname pattern |

### Supported Types And Examples

| Type     | Single Example         | Bulk Example                               | Use It For                                              |
| -------- | ---------------------- | ------------------------------------------ | ------------------------------------------------------- |
| SINGLE   | `bad-host.example.com` | `bad-host.example.com,scanner.example.net` | Blocking exact hostnames                                |
| WILDCARD | `*.example.com`        | `*.example.com,*.example.net`              | Blocking every hostname under a matching domain pattern |

The panel supports comma-separated multi-entry input for adding multiple hostnames at once.

### Example Scenarios

| Scenario                                     | Type     | Value Example                              |
| -------------------------------------------- | -------- | ------------------------------------------ |
| Block one exact hostname                     | SINGLE   | `bad-host.example.com`                     |
| Block two exact hostnames at once            | SINGLE   | `bad-host.example.com,scanner.example.net` |
| Block all subdomains from a hostname pattern | WILDCARD | `*.example.com`                            |
| Block multiple wildcard hostname patterns    | WILDCARD | `*.example.com,*.example.net`              |

### How To Add

1. Open Settings > Blacklist > Hostname.
2. Choose SINGLE or WILDCARD.
3. Enter the hostname value.
4. Click Add.
5. Review the Blacklist Hostname List.

### Blacklist Hostname List

| Column    | Description                    |
| --------- | ------------------------------ |
| Date Time | Time when the rule was created |
| Type      | Rule type                      |
| Hostname  | Blocked hostname value         |
| Action    | Edit or remove the rule        |

### Notes

* Hostname checks depend on hostname data available for the visitor IP.
* Use wildcard entries carefully because they can match many hosts.
* If you want to explicitly allow a host, use Whitelist Hostname.

### Related Pages

| Page                                                                                           | Purpose                                     |
| ---------------------------------------------------------------------------------------------- | ------------------------------------------- |
| [Whitelist Hostname](https://docs.stopbot.net/v2/panel-guides/settings/whitelist/hostname)     | Allow trusted hostnames                     |
| [Blacklist IP Address](https://docs.stopbot.net/v2/panel-guides/settings/blacklist/ip-address) | Block traffic by IP                         |
| [Blocker V2](https://docs.stopbot.net/v2/panel-guides/services/blocker-v2)                     | Use hostname rules with advanced protection |
