---
title: Block or redirect visitors
canonical: https://wpsecurityninja.com/docs/firewall/block-or-redirect-visitors/
---
When Cloud Firewall (Pro) blocks a visitor (banned IP, country rule, or other firewall rule), you choose what they see next: a message on your site, or a redirect to another URL.

Configure this on **Security Ninja → Firewall → Settings** after the firewall is enabled.

![Message or redirect options for blocked visitors](https://wpsecurityninja.com/media/2019/07/message-or-redirect-blocked-visitors.webp)

## Show a message (default)

Leave **Redirect blocked visitors** empty. Blocked visitors see your custom ban message (or the default message).

This applies when the visitor is blocked by the shared bad-IP list, a local blacklist, a country rule, or other firewall enforcement that denies the request.

## Redirect to another URL

1. Open **Security Ninja → Firewall → Settings**.
2. Find **Redirect blocked visitors**.
3. Enter a full URL, for example `https://example.com/blocked/`.
4. Save settings.

Blocked visitors receive a **301** redirect to that URL.

## Switch back to a message

Clear the redirect URL field and save. The firewall returns to showing the ban message.

## Related

* [How to use the firewall](https://wpsecurityninja.com/docs/firewall/how-to-use-the-firewall/)
* [How to block a country](https://wpsecurityninja.com/docs/firewall/how-to-block-a-country/)
* [How to blacklist an IP](https://wpsecurityninja.com/docs/firewall/how-to-blacklist-an-ip/)
