> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/websites/ip-access-rules.md).

# IP Access Rules

Allow or block specific IPs or ranges. In hPanel this tool is called **IP Manager**.

Common uses:

* Block abusive IPs
* Restrict access to your office or team
* Lock down development sites

## Add a rule in hPanel

1. Open your website dashboard.
2. Go to **Advanced** → **IP Manager**.
3. Use the **Allow an IP** or **Block an IP** form.
4. Enter the IP or range, plus an optional note to remind you why the rule exists.
5. Save.

## IP formats

| Format     | Example          | Matches                       |
| ---------- | ---------------- | ----------------------------- |
| Single IP  | `203.0.113.5`    | One IP                        |
| CIDR range | `203.0.113.0/24` | `203.0.113.0`–`203.0.113.255` |

## Allow vs. Block

| Rule type | Effect                                                |
| --------- | ----------------------------------------------------- |
| **Allow** | Only listed IPs can access. Everyone else is blocked. |
| **Block** | Listed IPs are blocked. Everyone else can access.     |

> **Warning:** With an **Allow** rule, only listed IPs work — include your own IP, or you'll lock yourself out.

## Edit or remove

Rules are listed in the panel. Click to edit, or **Delete** to remove.

## Via `.htaccess`

Block a specific IP:

```apacheconf
Require all granted
Require not ip 203.0.113.5
```

Allow only specific IPs (block everyone else):

```apacheconf
Require ip 203.0.113.5
Require ip 198.51.100.0/24
```

Block a range:

```apacheconf
Require all granted
Require not ip 203.0.113.0/24
```

***

*Last updated: July 22, 2026*
