How to Hide Shipping Methods by ZIP Code in Shopify
Many Shopify merchants need to exclude specific ZIP codes or postal codes from certain shipping methods. You might want to hide a flat-rate option for remote areas that cost more to reach, restrict free shipping from Alaska or Hawaii, or prevent express delivery from showing in regions your carrier doesn't serve.
The challenge: Shopify's shipping zones are organized by country and state/province, not by individual ZIP codes. While you can create zones for specific postal code ranges in some cases, managing long lists of excluded codes or combining ZIP restrictions with other conditions (cart total, product tags) quickly becomes impractical. This guide explains your options.
What Shopify Offers (and Doesn't)
Shopify's shipping admin lets you configure shipping zones based on countries and regions. For the United States and Canada, you can create zones that target specific ZIP or postal code ranges.
Native ZIP Code Zones (US and Canada)
In your Shopify admin, you can create a shipping zone and add ZIP or postal code ranges to it. For example, you could create a zone for "90000-90999" (parts of California) and set specific rates for that zone.
To create a ZIP-based zone:
- Go to Settings → Shipping and delivery
- Click Create zone (or edit an existing zone)
- Select your country (US or Canada)
- Instead of selecting entire states or provinces, choose Add ZIP codes or Add postal codes
- Enter your ranges (e.g. "10001-10100, 10200-10299")
- Set shipping rates for that zone
This approach works well if you need to offer different rates for specific ZIP codes. But it has limitations:
- Only available for US and Canada. Other countries cannot use ZIP-based zones.
- No negative filtering. You can create a zone for specific ZIPs, but you cannot easily say "apply this rate everywhere except these ZIPs."
- Difficult to maintain long exclusion lists. If you want to exclude 50+ remote ZIP codes from a flat rate, you'd need to list all the included ranges instead, which is tedious and error-prone.
- No conditions beyond location. You can't combine ZIP restrictions with cart total, product tags, or customer attributes using zones alone.
Shopify Plus: Checkout Blocks
If you're on Shopify Plus, you can write custom JavaScript in a Checkout UI Extension to hide shipping methods based on ZIP code and other conditions. This requires coding, testing, and deployment. Most merchants prefer a no-code solution.
Delivery Customization Apps
Shopify's delivery customization API (available on all plans) allows apps to hide shipping methods based on destination ZIP code, postal code, or any other checkout condition. Apps using this API can filter methods without requiring custom zones or code.
These apps run server-side as part of Shopify's checkout flow, so they work reliably with all checkout types, including Shop Pay and accelerated checkouts.
Common Use Cases
Hide Flat-Rate Shipping for Remote ZIP Codes
You offer a $5 flat-rate shipping option for most of the US, but your carrier charges significantly more for Alaska, Hawaii, and remote territories. You want to hide the flat rate for those locations and show only calculated carrier rates.
Scenario
You offer "$5 Flat Rate" shipping, but it's not profitable for Alaska (ZIP codes starting with 995-999) or Hawaii (ZIP codes starting with 967-968). You want to hide it for those regions.
Rule
Condition: Shipping ZIP code starts with "995," "996," "997," "998," "999," "967," or "968"
Action: Hide shipping method with title "$5 Flat Rate"
Result
Customers in Alaska and Hawaii see only carrier-calculated rates. Everyone else sees the flat rate.
Hide Free Shipping for Specific Postal Codes
You offer free shipping on orders over $50, but shipping to certain remote areas costs more than your margin allows. You want to hide free shipping for those ZIP codes, even when the cart qualifies.
Scenario
Free shipping is available for orders over $50, but not for remote Canadian postal codes in the territories (starting with X or Y). You want to hide free shipping for those areas.
Rule
Condition: Shipping postal code starts with "X" or "Y"
Action: Hide shipping method containing "Free"
Result
Customers in Yukon, Northwest Territories, and Nunavut do not see free shipping, even if their cart exceeds $50. Paid options remain visible.
Restrict Express Shipping by ZIP Code
Your carrier does not offer overnight or express delivery to certain regions. You want to hide express methods for those ZIP codes so customers don't select an option that can't be fulfilled.
Scenario
Your carrier's express service is not available to rural ZIP codes. You want to hide "Express" and "Overnight" for those areas.
Rule
Condition: Shipping ZIP code is in a list of excluded codes (e.g. "12345, 23456, 34567")
Action: Hide shipping methods containing "Express" or "Overnight"
Result
Customers in excluded ZIP codes see only standard or economy shipping. Express options are hidden.
Combine ZIP Code with Cart or Product Conditions
You want to hide a shipping method only when both the destination ZIP code is remote and the cart contains heavy or oversized items. Native zones cannot handle this combination, but delivery customization apps can.
Scenario
You offer a $10 flat rate, but it's not viable for heavy items (tagged heavy) shipped to Alaska or Hawaii.
Rule
Condition 1: Cart contains a product with tag "heavy"
Condition 2: Shipping ZIP code starts with "995," "996," "997," "998," "999," "967," or "968"
Action: Hide shipping method "$10 Flat Rate"
Result
The flat rate is hidden only when heavy items are in the cart and the destination is Alaska or Hawaii. Otherwise, it remains visible.
How to Think About ZIP-Based Rules
When hiding shipping methods by ZIP code, you typically use one of these condition patterns:
- Starts with: "ZIP code starts with 99" (covers all ZIPs from 99000-99999)
- Exact match: "ZIP code equals 12345" (only that specific ZIP)
- List of codes: "ZIP code is in [12345, 23456, 34567]" (explicit exclusion or inclusion list)
- Range: "ZIP code is between 90000 and 90999" (a continuous range)
Most delivery customization apps support all of these patterns. Choose the one that best fits your needs.
Always Preview Before Publishing
Critical: Test every ZIP-based rule before making it live. Incorrect ZIP patterns can hide methods for the wrong customers or leave others without any shipping options. Use preview or test mode to verify rules with real addresses before activating them for everyone.
Most delivery customization apps offer a preview or safe test mode where rules apply only to designated testers (e.g. your email or customers tagged shipweaver). Test with addresses in the target ZIP codes to confirm the rule works as expected, then go live.
Best Practices
- Use prefix matching for efficiency. Instead of listing every ZIP in Alaska individually, use "starts with 995, 996, 997, 998, 999."
- Test with real addresses. Use preview mode and test checkout with actual ZIP codes to ensure rules behave correctly.
- Document your exclusions. Keep a note of which ZIP codes or ranges are excluded and why, especially if you manage multiple rules or work with a team.
- Check for conflicts. If multiple rules affect the same method, higher-priority rules win. Reorder rules to control which applies first.
- Don't hide everything. Make sure at least one shipping method remains visible. If all methods are hidden, customers cannot complete checkout.
Using ShipWeaver
ShipWeaver is a free Shopify app that uses delivery customizations to hide, rename, reorder, and sort shipping methods at checkout. It works on all Shopify plans and does not require coding.
Key features for ZIP-based rules:
- ZIP and postal code conditions: Hide methods based on ZIP code prefix, exact match, or list of codes.
- Combine with other conditions: Apply ZIP restrictions only when the cart total exceeds a threshold, certain products are present, or customer is tagged.
- Preview mode with safe testing: Rules in Preview status apply only to testers (your email or customers tagged
shipweaver), not regular customers. Test safely before going live. - Priority-based rules: Control which rule applies first by reordering them.
ShipWeaver only changes how shipping options display at checkout. It does not calculate rates, set prices, or integrate with carriers. Your existing carrier rates and shipping setup remain unchanged.
Install ShipWeaver from the Shopify App Store. For detailed setup and examples, see the ShipWeaver FAQ.
Key Takeaways
- Shopify natively supports ZIP-based zones for US and Canada, but they're difficult to use for exclusions or combined conditions.
- Shopify Plus merchants can use Checkout Blocks (requires coding).
- Delivery customization apps work on all Shopify plans and support ZIP-based hiding without creating custom zones.
- Always use preview or test mode to verify ZIP-based rules before activating them for customers.
- Use prefix matching (e.g. "starts with 99") to efficiently target ZIP code ranges.
Related
How to Hide Shipping Methods · How to Show Local Delivery Instead of Shipping · FAQ · Blog