> For the complete documentation index, see [llms.txt](https://liieditors.docs.laws.africa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liieditors.docs.laws.africa/system-management/block-an-ip-address.md).

# Block an IP address

If your website comes under load from a bad IP address, use nginx to block it.

Edit (or create) the file `/home/dokku/APP/nginx.conf.d/block.conf`.

In that file, add the nginx `deny` setting for the IP, such as:

```
deny 10.20.30.40;
```

Validate the nginx config with:

```
sudo service nginx configtest
```

If nginx is happy, then reload nginx's config:

```
sudo service nginx reload
```

## Further reading

Read more about the [nginx access module](https://nginx.org/en/docs/http/ngx_http_access_module.html) for available settings.
