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