Shipping & customs5 min read
Hide or Block a Shopify Delivery Option for UK Postcodes
Shipping zones stop at country and region. How to hide or block a delivery option for Highlands and Islands postcodes with lists and prefixes, and test it first.
In this guide
If you ship your own parcels from the UK, you know the problem. A buyer on Lewis, Shetland or Orkney picks next-day delivery at checkout, your carrier charges you a remote-area surcharge or cannot deliver next day at all, and you sort it out after the order. The same question has come up in the Shopify Community since 2024, for example in this thread about preventing orders to certain postcodes, where one reply asks how to enter a series of postcodes instead of one at a time.
This guide explains where the gap sits, how to describe a set of postcodes as a list or a prefix instead of one code at a time, and how to check the rule before a buyer meets it.
Why shipping zones do not reach postcodes
In Shopify, a shipping zone is a set of countries and, for some countries, regions. Each rate you add lives in a zone. That is the right tool for deciding which rates exist for a country. It has no field for a postcode, so it cannot say “not next day to HS postcodes” on its own.
What can act at that level is checkout logic that runs on the rates a zone already offers. Shopify lets apps do this with Shopify Functions: a delivery customization can hide, rename or reorder the delivery options a buyer sees, and a checkout validation can stop checkout with a message. Both read the delivery address, including the postcode.
First, write down your postcode list
Before you build any rule, decide which postcodes you mean. There is no single official “Highlands and Islands” list: each carrier publishes its own list of postcodes it treats as remote or offshore, and they differ. Start from the list your carrier uses for surcharges or longer transit times.
Some postcode areas are easy because the whole area is islands:
| Postcode | Area |
|---|---|
| HS | Outer Hebrides |
| ZE | Shetland |
| KW15, KW16, KW17 | Orkney |
Others are mixed. The IV, PA, PH and KA areas, for example, cover both mainland towns and islands, so carrier lists name individual districts in them rather than the whole area. Copy those districts from your carrier’s list instead of guessing.
Lists, prefixes and ranges
A rule that has to match dozens of postcodes needs a better input than one code at a time. There are three ways to describe a set:
- Exact values: a list of full postcodes, for the handful of addresses you need to treat differently.
- Prefixes: every postcode that starts with the text, such as
HSorZE. This is the natural fit for UK postcodes, because the start of the postcode is the area and district. - Ranges: every code between two values, which fits countries whose postcodes are plain numbers.
Prefixes have one trap with UK postcodes. A prefix of KW1 also matches KW10 to KW17, which includes Orkney. If you mean only the district, list it so that it cannot catch its neighbours, and test a postcode from each side of the line.
What to do with the matching postcodes
Once the postcodes are described, pick what the buyer should see:
- Hide the option that does not work. For example, hide any delivery option whose title contains “Next day” when the postcode starts with
HS,ZE,KW15,KW16orKW17. The buyer still sees your standard option. - Rename it so the buyer knows what to expect. If standard delivery to the islands takes longer, give the option a name that says so for those postcodes.
- Block checkout with a message. If you do not ship to some postcodes at all, stop checkout and tell the buyer why, instead of cancelling and refunding the order later.
A note on surcharges: hiding and renaming work on the rates your shipping settings already create; they do not change a price. If islands need a higher price, add a separately named rate for it in your shipping settings, then use rules to hide the standard rate for island postcodes. Check what a mainland address sees as well, because the island rate is still in the zone for everyone else unless a rule hides it.
Test before a buyer does
A postcode rule is easy to get almost right. Before you switch it on, try at least these addresses:
- A postcode inside the list, such as one starting with
HS. - A postcode next to the list that must not match, such as
KW1when you listed only Orkney. - The same postcode written in lowercase and without a space, the way buyers often type it.
- A cart that should not be affected, so you can see the rule leaves it alone.
For each one, check which options the buyer would see and whether checkout can be completed.
Where Livra: Postcode Shipping Rules fits
Livra: Postcode Shipping Rules is an app that hides, renames or reorders delivery options and blocks checkout by product, cart, customer and address, including postcode lists, prefixes and ranges. One rule can hold the whole list, so you do not enter one postcode per rule.
- Conditions: product tag, collection, type, vendor and SKU; cart subtotal, weight and quantity; country, region and postcode by exact value, prefix or range; customer tag, login and B2B company; weekday, dates and time of day; and address lines such as PO boxes or parcel lockers.
- Actions: hide options, rename them, move them to the top or bottom, or block checkout with a buyer message in English, German, French, Italian, Spanish, Dutch or Polish.
- Simulator: enter a cart, an address, a customer and a language, and see which rules match, what happens to each option and whether checkout is blocked. It runs the same engine as checkout and sends nothing there.
- Presets: EU presets for islands and special territories, chilled, alcohol and animal-origin goods. They start switched off. For UK postcodes such as the ones above, you write the list yourself.
The rules run as Shopify Functions, which public apps can use on every Shopify plan, and the app is for shops that ship their own orders, at home or across borders. It does not change shipping prices and does not edit your theme. It is in Shopify App Store review and cannot be installed yet.
If postcodes are why your delivery options go wrong, try Livra: Postcode Shipping Rules or see the app’s page.
FAQ
Can a Shopify shipping zone be limited to certain postcodes? A shipping zone is built from countries and, for some countries, regions. To act on postcodes, use checkout logic such as a delivery customization or a checkout validation, which read the delivery address.
Is there an official list of Highlands and Islands postcodes? Not one that every carrier uses. Each carrier publishes its own list of remote and offshore postcodes, so build your rule from the list of the carrier you ship with.
Should I hide the option or block checkout? Hide or rename an option when another option still works for the buyer. Block checkout with a message only for postcodes you do not ship to at all.
Can a rule add a surcharge for island postcodes? No. Rules work on the delivery options your shipping settings create. Add a separately named rate with the price you need, then use rules to decide who sees which rate.