Octolize shipping plugins for every scenario

Shipping illustration Explore plugins

WooCommerce Shipping Based on Zip Code/Postcode/Postal Code

WooCommerce Shipping Based on Zip Code
Updated:
2025-08-25
Reading time:
7 minutes read

If you run a WooCommerce store and want to offer more accurate, location-specific shipping, setting up delivery rates based on zip codes (also known as postcodes or postal codes) is a powerful solution for WooCommerce store owners looking for how to set shipping rates by postcode in WooCommerce. Instead of relying on broad shipping zones, you can define precise rules by area and ensure that your customers see only the options that actually apply to them.

Whether you’re offering local delivery, pickup within city limits, or adjusting rates based on distance, configuring WooCommerce shipping by zip code allows you to tailor the checkout experience, reduce errors, and improve customer satisfaction. This guide will show you step by step how to configure WooCommerce shipping methods based on zip/postal codes. I’ll show you native settings and plugins that support advanced shipping logic.

Why Set Up Shipping Based on Zip/Postcode in WooCommerce?

Setting up shipping rules based on zip codes (or postcodes) is one of the most effective ways to offer accurate and location-specific delivery options in your WooCommerce store. Instead of relying on broad shipping zones like countries or entire regions, zip code-based shipping lets you tailor costs, services, and availability down to a precise area. It can be a city block, rural town, or specific delivery district.

This is especially useful for local businesses, stores with warehouse-based fulfillment, or retailers offering in-person delivery. For example, a bakery in Berlin might want to offer same-day delivery only within the 10115, 10117, and 10119 postcodes, while charging a higher fee for surrounding areas. Similarly, stores shipping large or heavy items (like furniture) can use zip codes to apply distance-based surcharges, avoiding profit loss from long-haul deliveries.

From a business perspective, postcode-based shipping improves both cost control and customer satisfaction. You avoid undercharging or overcharging for certain destinations, while giving shoppers realistic options that match their expectations.

While zip/postcode-based shipping gives you precision over defined areas, it’s not the only way to localize your delivery options. If your shipping rates depend more on how far the customer is from your fulfillment point, rather than their exact postcode, a distance-based WooCommerce shipping may be more effective. It allows you to calculate shipping costs dynamically, based on the actual delivery distance.

In short, setting up zip/postcode shipping in WooCommerce gives you:

  • Precision: Deliver only where you really can.
  • Flexibility: Offer multiple methods depending on area.
  • Control: Balance cost and service based on real distances.
  • Trust: Communicate clearly, avoid surprises at checkout.

Want to see how to set this up in your store? Keep reading or skip ahead to our step-by-step tutorial below.

Understanding WooCommerce Shipping Zones for Zip/Postcode-Based Shipping

Let’s start with a bit of theory. You can’t talk about WooCommerce shipping based on zip code without mentioning WooCommerce shipping zones… To cut the story short the shipping zones are groups of locations where you want to ship your products to. You can easily group the continents, countries, states/provinces and even Zip or postal codes. WooCommerce will match a customer to a single zone using their shipping address and present the shipping methods within that zone to them. In other words, you can use them to:

  • offer the same shipping method or set of methods for the whole Europe,
  • define a shipping zone covering a few selected USA states e.g. FL, GA and AL,
  • narrow down the shipping area precisely to include only specific city district based on postcodes.

These are just a few use cases. Shipping zones in WooCommerce are highly flexible, making them ideal for both simple and advanced shipping setups. It’s all up to you how you configure them and which setup suits your business best.

If you want to learn more about shipping zones in WooCommerce, be sure to check out our article WooCommerce Shipping Zones Explained.

How to add WooCommerce Shipping Zones based on Zip/Postcodes?

WooCommerce allows you to group shipping rates by ZIP/postal codes for more accurate and localized delivery options. In this section, you’ll learn step-by-step how to set up shipping zones based on ZIP codes in WooCommerce, using the built-in features.

Create Shipping Zone in WooCommerce

To enable WooCommerce shipping by ZIP/postcode, start by creating a shipping zone. Even if you already have zones configured, it’s important to understand how to use them specifically for postcode-based shipping rules. For adding shipping zones, go to WooCommece -> Settings -> Shipping -> Shipping Zones. Then click the Add Shipping Zone button.

Create shipping zone in WooCommerce

Configure Shipping Zone

You will be redirected to the new shipping zone settings page.

configure shipping zone in WooCommerce

 

Define its name by filling in the Zone name field and select below the Zone regions which it should cover.

Configure shipping zone based on zip code

As I mentioned before you can set the shipping zone to cover the entire continent, country, region or even postcodes. To create ZIP/postcode-specific shipping zones, click the “Limit to specific ZIP/postcodes” link when defining the region. This lets you target precise delivery areas with WooCommerce shipping methods.

limit to specific postcodes in WooCommerce

Once the Limit to specific ZIP/postcodes link is clicked the additional text-area field will appear below where you can put all the postcodes you want the shipping zone to be narrowed to. You can enter ZIP/postcodes in three flexible formats, which gives you full control over your WooCommerce shipping setup:

  1. directly, typing the full postcodes manually one per line, e.g.:
    Postcodes list
  2. by defining their ranges, e.g. 90210…99000. If used, the shipping zone will cover all the postcodes between 90210 and 99000 such as 90211, 93123, 98157, etc.
  3. using so called wildcards and placing an asterisk sign * in right place of the postcode, e.g. AB10* wildcard will cover all the postcodes starting with ‘AB10’ phrase, e.g. AB10 1AP, AB10 1AR, AB10 1AQ and so on.

UK Shipping zones configuration - Postcodes pasting

Add shipping method based on postcode

When you have your WooCommerce shipping zones by postcode configured, you can add a shipping method that will be displayed for your customers using their shipping address. To do that, just click on Add shipping method button and select the type of your shipping method.

WooCommerce Add shipping method window
Add shipping method

In the popup window, which should appear, choose Flat rate, Free shipping, Local pickup or Flexible Shipping method if you have the Flexible Shipping plugin installed. Then, configure it according to your needs. You can add as many ZIP code-specific shipping methods within a shipping zone as you want.

Remember to save changes, and your shipping zone based on postcodes will be ready to use. This method works well for simple setups, but it can become inefficient if you want to assign different shipping rates to many individual zip codes or postcode groups. In that case, you’d need to create a separate shipping zone for each location. It can quickly become time-consuming and hard to manage as your WooCommerce store grows. But what if I told you there’s a more flexible and scalable way to handle postcode-based shipping?

Better Way to Set WooCommerce Shipping Based on Zip Code, Postcode, or Postal Code

Creating separate shipping zones for every zip code or postcode can work, but it’s not ideal for stores with many local delivery areas or varying rates per location. As your shipping setup grows, managing dozens of individual zones becomes messy and time-consuming. Instead of creating a separate shipping zone for each zip code, you can set up the same thing in one shipping zone. How? The answer, as usual with WordPress, is the right WooCommerce shipping plugin.

The Flexible Shipping Locations plugin (an extension to the free Flexible Shipping plugin) allows you to set the shipping cost for specific locations. You can create custom locations based on zip code, and set delivery cost for them inside one shipping zone.

Flexible Shipping Locations WooCommerce
£29.00

Extend Flexible Shipping with custom locations and create shipping costs based on weight, order totals or item count.

View Details or Add to cart
Plugins used by 245,613+ shops
30-day money back guarantee
Last Updated: 2025-08-11
Works with WooCommerce 9.7 - 10.2.x

Key Benefits of This Method:

  • Define unlimited custom locations based on zip/postal codes
  • Apply different shipping costs to each location without adding new shipping zones
  • Simplify your WooCommerce shipping logic and reduce manual work
This solution is ideal for WooCommerce store owners offering zip-code-specific shipping rates, especially for local deliveries or businesses operating in urban areas with distinct postal codes.

I’ll show you step-by-step how to set WooCommerce shipping based on zip code/postcode.

Configure custom shipping locations in WooCommerce

First, please make sure you have installed and activated the Flexible Shipping and Flexible Shipping Locations plugins. Then, go to WooCommerce → Settings → Shipping → Flexible Shipping Locations.

flexible shipping locations menu

You can create unlimited custom locations by clicking Add location button.

set custom shipping locations

As you can see, it’s very similar to the shipping zones configuration. But in that case, it’s much faster and easier to configure.

Each location requires:

  • A Location Name (e.g., “Downtown Area”)
  • A Region (e.g., a specific country or state)
  • Zip/postcodes – you can enter:
    • Full postcodes (e.g., 90210)
    • Ranges (e.g., 90000…90999)
    • Wildcards (e.g., AB10* to match all codes starting with AB10)

You can add as many locations as needed. Just remember to use clear, recognizable names for easier management later. Once configured, you’ll be able to assign different shipping costs to each custom location directly from the Flexible Shipping method settings.

If you need further information, check Flexible Shipping Locations documentation.

Set shipping method based on zip code

Now, it’s time to add a shipping method. Go to the shipping zone that will match with all the custom locations you have just created and click on Add shipping method button. In the popup window, choose Flexible Shipping method if you have the Flexible Shipping plugin installed. The new Flexible Shipping method will be available to edit. Click on it to set the WooCommerce shipping based on postcode.

new flexible shipping method

You can set that method title and description, change its tax setting and all the additional features that are included in the Flexible Shipping plugin. After you set that up, scroll down to the Shipping Cost Calculation Rules table.

Shipping Cost Calculation Rules table

In the conditions field, select Location.

shipping based on location in WooCommerce

Then, select your custom location and set it’s cost. You should add a new rule for each of your custom locations.

shipping cost based on postcodes in WooCommerce

This way, that shipping method will be displayed only when one of your custom locations will match the customer’s address. As you can see, you can also set different shipping cost based on location. As usual, remember to Save changes, and you are good to go.

If you ship products locally, you may also want to consider WooCommerce shipping by distance.

Examples of Using Flexible Shipping Locations in Real WooCommerce Stores

Setting up shipping by zip/postal code using the Flexible Shipping Locations plugin opens up a wide range of possibilities for WooCommerce store owners. Instead of juggling multiple shipping zones, you can manage all local shipping logic in one place.

Here are a few real-world examples showing how this plugin solves common ecommerce delivery challenges:

Tiered delivery costs across London districts

An independent grocery store based in East London wants to offer local delivery with varying rates depending on proximity. They define three custom locations:

  • Central London (Zone 1) – postcodes: EC1*, EC2*, WC1*, WC2*
  • East London (Zone 2) – postcodes: E1*, E2*, E3*, E5*
  • Outer East London (Zone 3) – postcodes: E6*, E7*, E10*, E11*

They apply lower delivery fees (£2.50) for customers in Central London and gradually increase it to £5.00 for Zone 3. This setup works inside one shipping zone using only the Flexible Shipping Locations plugin.

Extra charges for Highlands and remote UK postcodes

An outdoor gear shop based in Leeds ships UK-wide but faces increased courier charges when delivering to Scottish Highlands. Instead of setting up a separate shipping zone, they create a custom location called “Highlands Surcharge”, covering:

  • Postcodes like: IV*, KW1–KW14, PA20–PA78, PH17–PH50

They apply a £10 surcharge when this location matches the customer’s postcode — all within a single Flexible Shipping method.

Configuring postcode-based delivery rules in the UK can be tricky. Fortunately, we’ve covered this topic in detail in our dedicated guide: How to Set Up UK Shipping Zones in WooCommerce

Free local delivery in Bristol only

A sustainable home goods store offers free delivery to customers in Bristol, but charges a standard shipping rate elsewhere in the UK. They define a custom location “Bristol Free Delivery” with postcodes starting with BS1 to BS16. Customers within this location automatically get free shipping, while others see the regular £4.99 fee.

WooCommerce Shipping Based on Zip Code/Postcode/Postal Code

In this guide, you’ve learned how to set up WooCommerce shipping rates based on zip codes or postcodes using built-in shipping zones and the Flexible Shipping Locations plugin. This method allows you to create location-based delivery rules specific to certain areas. It’s ideal for local delivery, regional surcharges, or postcode-specific shipping rates. Instead of relying on broad zones, you can define accurate shipping costs for each zip code or group of postcodes. It’s a flexible and scalable solution to improve your WooCommerce checkout experience and reduce delivery errors. Ready to simplify your shipping setup? Start configuring it today!

Content Writer at Octolize

Bartosz Gajewski is a content and marketing specialist with a solid background in SEO, WordPress content strategy, and technical documentation for digital products. With years of hands-on experience in both in-house and freelance roles, he supports tech companies – especially in the SaaS and e-commerce space – by creating content that informs, engages, and drives results.

His approach blends storytelling with data-driven SEO, and he’s been involved in projects ranging from rebranding and product marketing to growth experiments and copywriting for complex software tools. On the blog, he shares actionable insights from his work across marketing teams, product documentation, and online store optimization.

Comments
4 Comments
Inline Feedbacks
View all comments
WaqasAhamd
WaqasAhamd
3 years ago

Thank you for the nice explanation about the use of wildcards.

Sakina
Sakina
1 year ago

Hello, I did as you asked using wildcards, but the problem is the payment method is still shown even if we dont deliver in that area, if the delivery is off then there should be no delivery option

Łukasz Spryszak
Łukasz Spryszak
Admin
Reply to  Sakina
1 year ago

Hi Sakina, just to make sure if I got everything right – the payment method is being displayed in your shop’s checkout even when there are no shipping methods available to pick – is that correct?