How to block checkout for specific countries on Shopify
Short answer: Prevent orders from being placed with a shipping address in countries you cannot or do not want to serve. In Checkpost, choose “Block shipping to specific countries” from Templates, adjust the values, test it, then save and enable the rule.
The problem
Some destinations bring high fraud rates, sanctions risk or carriers you can't use. Even when you don't offer shipping there, orders can still slip through with digital products, local pickup or misconfigured shipping zones.
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Block shipping to specific countries.
- Replace the country codes with the ISO codes you want to block.
- Use Try this rule to test a sample cart, then click Save rule.
The rule
Checkout is blocked when all of these conditions is true:
- Country is any of RU, BY
Shoppers see: “Sorry, we don't ship to this country.” at the country field, once they reach checkout.
Rule definition (JSON)
{
"name": "Blocked countries",
"match": "all",
"conditions": [
{
"kind": "text",
"field": "ship_country",
"op": "equals_any",
"values": [
"RU",
"BY"
]
}
],
"message": "Sorry, we don't ship to this country.",
"target": "countryCode",
"runOn": "checkout"
}Where this rule works
These are cart and checkout validations, including supported accelerated checkouts. They are current-cart policies; they do not track previous purchases of a SKU. Shopify excludes POS, recurring subscription orders and native pre-order/Try Before You Buy flows from this API. See Shopify's validation compatibility.
Tips
- Use two-letter ISO country codes (US, GB, DE).
- To allow only a short list of countries instead, switch the operator to "is none of" and list the countries you do serve.
- Combine with a product tag condition to restrict only certain products by country.
Can you do this without an app?
Shopify only offers shipping rates for countries in your shipping zones, so physical products usually can't be shipped elsewhere. A checkout rule adds an explicit, explained block and also covers pickup, digital and zero-rate edge cases.
FAQ
Does this use the shopper's IP location?
No. It checks the country of the shipping address entered at checkout. To restrict by the storefront market a shopper is browsing, use the Market country condition instead.
Can I show a different message per country?
Yes. Create one rule per country (or group of countries), each with its own message.
Related rules
Block PO Box addresses
Stop checkout when the shipping address contains a PO Box, so carriers that cannot deliver to PO Boxes never receive the order.
Block specific ZIP / postal codes
Block checkout for postal codes you can't deliver to, using exact codes or prefixes (for example remote islands or rural areas).
Only allow listed postal codes (local delivery)
Allow checkout only when the shipping postal code is inside your delivery area — ideal for local bakeries, florists and grocery delivery.
Restrict products in certain states
Block checkout when a restricted product (for example knives, vapes, supplements or CBD) is shipped to a state or province where it can't be sold.