> ## Documentation Index
> Fetch the complete documentation index at: https://codebeans-cb-checkout-rules.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Prevent P.O. Boxes

> Block P.O. Box and post office box addresses, in several languages.

Many carriers can't deliver to P.O. Boxes. This rule blocks checkout when **Address line 1** or **Address line 2** looks like a P.O. Box.

## What it checks

The rule looks for these words in Address line 1 and Address line 2 together. Upper and lower case don't matter.

| Language | Detected words |
| - | - |
| English | `P.O. Box`, `PO Box`, `P O Box`, `POBox`, `Post Office Box` |
| German | `Postfach` |
| French | `Boite Postale` |
| Spanish | `Apartado`, `Casilla` |
| Portuguese | `Caixa Postal` |

| Address | Result |
| - | - |
| `12 Main Street` | Allowed |
| `PO Box 4021` | Blocked |
| `Postfach 1234` | Blocked |

The message appears next to **Address line 1** of the address that has the problem.

![Checkout address form with PO Box 4021 in the address field and the error: We can't deliver to P.O. Boxes. Please enter a street address.](https://mintcdn.com/codebeans-cb-checkout-rules/9lVKcptiAqYAtTXj/images/po-box-error.svg?fit=max\&auto=format\&n=9lVKcptiAqYAtTXj\&q=85\&s=d4c8b38e3e5254d9d8778ce2ffba3538)

## Settings

| Setting | Description |
| - | - |
| Countries | **All countries**, or only orders shipped to **Specific countries**. |
| Validate in | **Shipping address**, **Billing address**, or both. |
| Message to display | What the customer sees. English is required. |
| Rule status | Active, Testing or Deactivated. See [Rule status and testing](https://codebeans-cb-checkout-rules.mintlify.site/rules/rule-status-and-testing.md). |
| Checkout behavior | See [Common rule settings](https://codebeans-cb-checkout-rules.mintlify.site/rules/common-settings.md#checkout-behavior). |

## Example message

```text theme={null}
We can't deliver to P.O. Boxes. Please enter a street address.
```

> [!TIP]
>
> Only want to block P.O. Boxes for some orders, such as heavy parcels? Use a [custom rule](https://codebeans-cb-checkout-rules.mintlify.site/custom-rules/examples.md#block-po-boxes-for-heavy-orders) with the **PO Box address** condition.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.