Shopify works out shipping rates by zone, and a zone is a country or a region. That is too coarse for a lot of stores. A courier that only covers rural postcodes doesn't line up with a Shopify zone, and neither does a same-day van that only drives inside the city.

A shipping method rule fixes that after Shopify has calculated the rates. It looks at the buyer's postcode and decides which rates they see. This guide covers the two rule types that do most of the work, and the postcode ranges that make them practical.

Show only these rates

A Show only rule names the rates to keep. Every other rate in the rule's scope is hidden while the rule applies.

Say rural postcodes should only get your rural courier. You write one rule: show only "Rural Courier" when the postcode is in your rural list. Buyers in those postcodes see one rate. Everyone else sees the full list.

The advantage over a hide rule is that you name what stays, so a rate you add next month is hidden for those postcodes automatically. With a hide rule you would have to remember to add it.

One safety catch is built in. If none of the rates you named is offered at checkout, for example because the rate was renamed in Shopify, the rule hides nothing. Buyers in that area then see every rate instead of none, so a rename never stops orders.

Hide these rates

A Hide rule works the other way round, and it is the right choice when one rate should belong to one area. Same-day delivery is the usual example: hide "Same-day" for every postcode that is not in your delivery area. Buyers in the area see it, and nobody else does.

To stop orders from an area entirely, hide every rate there: a hide rule on *, which matches every rate, with the postcode condition. Buyers in that area see that shipping isn't available. Checkout can't complete without a rate, so no order goes through.

Postcode ranges

Writing out every postcode is fine for ten of them and useless for a thousand. The postcode condition takes ranges:

  • 2000-2999 for a block of numeric codes
  • 0800 to 0899 if you prefer words
  • 2000-2999, 4000, 6000-6999 to mix ranges and single codes in one condition

Pick is in range or is not in range as the operator. Leading zeros count, so 02000-02999 matches the US ZIP code 02139, and the ZIP+4 form 02139-1234 matches too.

Ranges only work for postcodes made of digits. For UK or Canadian postcodes, which start with letters, use starts with and a list of prefixes, such as BT, PA20, TR21.

Polish postcodes carry their own hyphen, so 00-950 is read as one postcode. Write a range of them with "to": 00-001 to 09-999.

Three rules that cover most stores

  1. Rural courier only. Show only your rural rate when the postcode is in the rural range.
  2. Same-day in town. Hide same-day delivery when the postcode is not in your city's range.
  3. Areas you can't serve. Hide every rate when the postcode is in the blocked list.

Test each one with a real postcode before you rely on it. Start a checkout, type a postcode inside the range, then one outside it, and check the rates change the way you expect.

Rules can also rename and reorder rates, and the same conditions work for payment methods. See how to hide, rename and reorder shipping methods and how to hide cash on delivery by postcode or cart value.

Frequently asked questions

Does this need Shopify Plus?

No. Shipping method rules run on every Shopify plan, because Shopify allows delivery customizations below Plus.

Can I use postcode ranges?

Yes, for numeric postcodes. Use "is in range" with values such as 2000-2999, 0800 to 0899, or a list that mixes ranges and single codes.

What happens if I rename a rate a show-only rule names?

If none of the named rates is offered, the rule hides nothing, so buyers see every rate instead of none.

How do I stop orders from one area?

Hide every rate for those postcodes. Buyers there see that shipping isn't available, and checkout can't complete without a rate.

Do ranges work for UK or Canadian postcodes?

No, those start with letters. Use "starts with" and a list of prefixes instead.