OrderGateTürkçe
← All guides

Blocking orders from a country, state, city or ZIP code in Shopify

For a whole country, remove it from your markets or shipping zones; Shopify then refuses it at checkout natively. For part of a country you still ship to, Shopify has no setting, so you need a checkout validation rule that reads the delivery address and rejects the checkout before an order exists. Postal-code prefixes and state codes match reliably; city names only match when spelled the way the buyer types them.

A whole country: use Shopify itself

Shopify only lets a buyer pick a country at checkout when it is in an active market and in a shipping zone with rates. Leave a country out of either and Shopify itself refuses it, for free, before anything else runs. No app is needed for that, and adding one would only duplicate what checkout already does.

One trap from Shopify's documentation: removing a country from a shipping zone does not deactivate its market. Check both places.

Part of a country you do ship to

The harder case is a single state, city or postal area inside a country you serve: a district where cash-on-delivery orders are refused at the door, an address range behind a run of chargebacks, a city your courier no longer covers. Shipping zones work at country and, in some countries, state level, so they cannot single out a city or a postal prefix without dropping the whole state.

A checkout validation function can. It reads the delivery address during checkout and can reject it, so the order is never created.

How OrderGate's region rule matches

A region rule always names a country, then optionally narrows it. Inside one field any listed value matches; across fields all of them must match.

  • Country and state use the address's codes (for example US and CA), compared without regard to case.
  • Postal codes match by prefix with spaces removed: "SW1" catches "SW1A 1AA", "340" catches every code starting 340.
  • City names match exactly, ignoring case and extra spaces — but not spelling. "Istanbul" and "İstanbul" are different strings; prefer a postal prefix or a state code where you can.
  • Pickup and digital-only orders have no delivery address, so a region rule does not apply to them.

What the buyer sees

A message next to the narrowest field the rule used — the postal code if the rule lists postal codes, otherwise the city, then the state, then the country — by default "We can't accept orders for this delivery destination." You can write your own. In wallet sheets such as Shop Pay, Shopify does not display the message; the block still applies.

Start in log-only mode. Region rules are the easiest to draw too wide, and log-only shows which recent orders the rule would have stopped before it stops anyone.