To block APO, FPO, and DPO addresses on Shopify, match the shipping city against APO, FPO, or DPO, keep the country set to the United States, use case-insensitive matching, and display a clear checkout message. Apply the rule only when your available carrier or product cannot serve military and diplomatic addresses.
Do not block these destinations by default. Shopify explains that APO, FPO, and DPO addresses are valid US military or diplomatic formats. The operational issue is carrier or product eligibility, not the legitimacy of the customer.
Understand the address format
Shopify's fulfillment guidance describes 3 types:
- APO: Army/Air Post Office
- FPO: Fleet Post Office
- DPO: Diplomatic Post Office
The city field should contain only APO, FPO, or DPO, while the country is United States. The address line contains the PSC or UNIT and BOX details. Matching the city is therefore more precise than searching every address line for the letters APO.
Confirm that blocking is necessary
Shopify notes that PO boxes, APO addresses, and FPO addresses are accessible only by certain carriers. Before creating a checkout block:
- Check whether one of your active carriers supports the destination.
- Confirm whether the restriction applies to every product or only regulated, oversized, perishable, or hazardous items.
- Decide whether another shipping method can be offered instead of blocking the order.
- Document how support will handle legitimate exceptions.
If one available service can fulfill the order, hiding an incompatible rate may create a better shopper experience than blocking the entire checkout.
Configure a targeted CartBlock rule
CartBlock documents shipping-address text conditions and case-insensitive matching. Current owned documentation says case-insensitive matching starts from the Premium plan. Verify the current plan and field options in your store.
- Create a basic validation with an internal title such as
Military address restriction — unsupported carrier. - Choose the shipping city field.
- Add values for
APO,FPO, andDPOusing the supported comparison. - Enable case-insensitive text matching so lowercase and mixed-case input behave consistently.
- If the installed builder supports the required combination, add product, market, or shipping-method conditions when the restriction is narrower than the whole store.
- Target the city or shipping-address field with the error message where supported.
- Save and test the rule.
Avoid a loose “contains PO” match across the entire address. It can catch unrelated street or company names and turn a precise shipping restriction into a false positive.
Give the shopper a recovery path
Explain why the current order cannot be shipped and what the customer can do:
We cannot ship this item to APO, FPO, or DPO addresses with the available carrier. Use a supported residential address or contact us to review delivery options.
If the restriction applies only to one product, name the item or category and let the shopper remove it. If an alternate carrier is available, point the shopper to the supported shipping option.
Test valid and invalid scenarios
| Scenario | Expected result |
|---|---|
City is APO, country is US |
Blocked when the policy applies |
City is fpo, country is US |
Same result with case-insensitive matching |
City is DPO, restricted product absent |
Checkout proceeds if scoped by product |
| Ordinary US city containing similar letters | Checkout proceeds |
| APO order using an approved carrier | Checkout proceeds if the policy allows it |
| Shop Pay or accelerated checkout | Same rule applies where supported |
Test province codes used for military mail as an additional signal only if the current rule supports them and your policy requires them. Do not rely on a country block: these addresses use United States as the country.
Frequently asked questions
Are APO and FPO addresses international orders?
They use a US military-mail format and select United States as the country. Treat them according to carrier guidance rather than ordinary international-country logic.
Can UPS or DHL ship to APO and FPO addresses?
Shopify states that only certain carriers can access PO box, APO, and FPO destinations. Check the exact service and route with your carrier before enforcing a rule.
Should I block DPO addresses with the same rule?
If the same carrier or product restriction applies, include DPO as an explicit city value. Keep it visible in the policy and test it separately.
Use a carrier rule, not a customer judgment
Military and diplomatic addresses are valid destinations with specific formats. Block them only when fulfillment evidence requires it, and offer a clear alternative. See how to configure case-insensitive address matching in CartBlock. For related workflows, review Shopify checkout address validation options and how to block PO Box addresses at Shopify checkout, then explore CartBlock address rules.

Install Now