# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://liieditors.docs.laws.africa/system-management/block-an-ip-address.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
