< Back to all blog posts

Restrict Your Store Using Zip Codes

with the Better Shipping App for Shopify

Learn how to use Better Shipping's zip code restriction to only allow customers in specific zip code areas to checkout.
Peter is the author and developer of the Better Shipping app for ShopifyBy Peter
02/28/2022

Learn how to use Better Shipping's zip code restriction to only allow customers in specific zip code areas to checkout.

If you need to restrict your store so only customers in specific zip codes can complete orders. Or even if you want to restrict specific shipping rates, like a local delivery shipping rate, to only appear to customers in a specific area, then Better Shipping is for you.

Some scenarios this comes in handy are:

  • Restrict customers from checking if they are not within your zip code area

  • Show a local delivery shipping rate when they are inside your local delivery range (and hide it when they are not)

  • Charge different amounts depending on the customer's zip code area

  • Exclude a list of zip codes from completing checking out, or using a specific rate (such as air shipping).

  • Restrict specific states and countries from checking out.

  • Restrict the checkout for zip codes if there is a specific product in the cart (see our article on Restrict Express Shipping Rates for Specific Products)

  • And so many more variations of restriction using zip codes and products

In this article, I'll go through the zip code restriction to stop customers checking out if they are outside your area, and charge different shipping prices for different areas.

Before we start, you will need a list of the zip codes you want to use in your restriction. Note, you do not need to list all the zip codes in your state or country. You can list the zip codes you want to use, or the zip codes you want to exclude (or both).

We have a USA common list of 'starts with' zip codes for each USA state. Feel free to copy and paste those to create a customized list of states, which you can also drill down to smaller areas within the states by adding more numbers to the starts with zip codes. The app support zip codes all the way to the finest zip+4 areas. You can copy and paste your list of zip codes into the app when you create your restricted shipping rate.

If you are in the UK, we have a UK common list of 'starts with' postcodes

If you require a radius around a specific point, for example a 30-mile radius around your brick and mortar store or warehouse, we have an article to get your Zip/Post code radius and set a radius, and then copy the Zip Codes/Postcodes in the comma separated format directly into the app.

Once you have your list of zip codes, we can get started creating the Better Shipping zip code restricted rate inside the app.

We have an informal video of the steps required or continue below for step-by-step instructions.


1. Create a new shipping rate
Better Shipping for Shopify create a new shipping rate screenshot
2. Choose a name and shipping zone
Better Shipping for Shopify choose a name and a shipping zone for the shipping rate screenshot
3. Choose Yes to enable the zip code restriction feature
Better Shipping for Shopify enable the zip code restriction feature screenshot
4. Turn on the ship within switch and add your zip code list
Better Shipping for Shopify turn on the include zip codes restriction and add your zip codes screenshot
5. If using per product, add your product rates
Better Shipping for Shopify do you want to use per product product rates question screenshot
6. If using per product rates, add your product rates
Better Shipping for Shopify per product product rates setup screenshot
7. Create and shipping rules you need
Better Shipping for Shopify create advanced shipping rules screenshot
8. Set up your advanced shipping rules as you need them
Better Shipping for Shopify advanced shipping rule create for a shipping rate screenshot
9. Finish your shipping rate setup
Better Shipping for Shopify click finish to finalize shipping rate set up screenshot
10. Test order inside the zip code area
Better Shipping for Shopify test successful inside the restricted shipping zip code area showing shipping rate at checkout screenshot
11. Test order outside the zip codes area
Better Shipping for Shopify test successful outside the restricted shipping zip code area not showing shipping rate at checkout and restricting the customer screenshot

Peter is the author and developer of the Better Shipping app for ShopifyBy Peter
02/28/2022