To block PO boxes on Shopify, create a checkout rule that checks the first line of the shipping address. BlockCart spots common PO box spellings, and customers who enter one see your message asking for a street address.
Before you start
You need an active BlockCart subscription to save a rule.
Set up the rule
- In BlockCart, select Create new rule. In the dialog, choose Cart and checkout validation.
- Name the rule, such as “No PO boxes.” Keep Rule input set to Standard input.
- Under Eligibility, select Only when conditions match. In Conditions, change the existing condition to Shipping address (line 1) and choose is a PO box. This operator needs no value.
- In Error message, write “We can't ship to a PO box. Please enter a street address.” Under Target placement, choose Address line 1 so the message appears beside the address field.
- Set Status to Live, then Save. Enter a PO box address in Shopify checkout to check that the message appears.

Example
| Rule input | Conditions | Error message | | -------------- | --------------------------------------------- | --------------------------------------------------------- | | Standard input | Shipping address (line 1) is a PO box | We can't ship to a PO box. Please enter a street address. |
Good to know
- is a PO box matches
PO Box,P.O. Box,P O BoxandPost Office Boxat the start of the line. It ignores letter case and punctuation, sop.o. box 12andPO-Box 12match too. - It does not match street names, so "123 Post Office Road" and "Hippo Box Lane" pass. It also does not match a line that only says
Box 12. Add an OR group with starts withBoxif your customers write it that way. - Need the opposite? is not a PO box matches every street address. Use it to allow only PO boxes for a product, for example.
- This rule checks address line 1. It does not check address line 2 or decide whether an address is a real PO box.
- is a PO box works with Standard, Attribute and Customer input. The rule can match only once the customer has entered a shipping address. Rule input is locked after you create the rule.
