New: Blockly Checkout Customizer is live — checkout rules, upsells & checkout analytics.Install free
Tutorial

Shopify Checkout Address Validation: Catch Bad Addresses Before They Ship

Failed deliveries start with addresses nobody checked. Learn how to validate shipping addresses at Shopify checkout, from missing house numbers and PO boxes to ZIP mismatches and forwarders, and when to block versus warn.

Shopify Checkout Address Validation: Catch Bad Addresses Before They Ship

A parcel addressed to "Maple Street" with no house number goes out, sits in a depot, and comes back two weeks later. You pay shipping twice, the customer is annoyed, and someone on your team spends twenty minutes emailing back and forth to fix something checkout could have caught in a second.

Address problems are among the most preventable costs in ecommerce. This tutorial covers the address issues worth checking at Shopify checkout, how to decide between blocking and warning, and how to write messages that get the customer to fix the address instead of leaving.

What Shopify already does

Shopify has two built-in tools here. Validate shipping address (Settings → Checkout → Address collection) suggests corrections in about 20 countries, but the customer can still continue with the address as typed. Address format validation (Settings → Checkout → Checkout rules) does block checkout: it can reject PO boxes, parcel lockers, military and diplomatic addresses, plus any field that matches a regex you write (Shopify Help Center). Neither tool knows the rest of your business rules. They can't block only the products your carrier won't take to a locker, the islands you don't ship to, or a forwarding warehouse you've had problems with.

For rules like these, you need a Cart and Checkout Validation function. It runs on Shopify's servers inside checkout, so it applies whether the customer used the normal checkout, an express button or a direct checkout link. Validation functions from a public app work on all Shopify plans.

The address problems worth checking

Missing house or building numbers

In most countries a street address without a number is undeliverable. A simple check is whether the first address line contains any digit. It catches "Maple Street" and "Main Road Apartment" while letting "12 Maple Street" through.

Be careful with exceptions. Rural addresses in some countries use named properties instead of numbers, and in some markets the number goes in a separate field or follows the street name. Apply this check to markets where you know the format, and treat it as a warning elsewhere.

PO boxes, APO and parcel lockers

Many carriers and delivery services can't deliver to PO boxes. Some products shouldn't go to parcel lockers because of size or because they need a signature. Detecting PO boxes means matching the many ways people write them: "PO Box", "P.O. Box", "Post Office Box", "POB" and local equivalents. Our guide to blocking PO box addresses lists the variants and the false positives to avoid, such as street names that contain "box".

ZIP code and country mismatches

A ZIP or postal code that doesn't match the country format usually means a typo or a mixed-up field. A five-digit US ZIP code entered on a UK address, for example, or a Canadian postal code without the letter pattern. Format checks per country catch most of these.

ZIP codes also define delivery areas. If you offer local delivery only in certain postal codes, or can't ship to particular regions, a ZIP rule enforces it. Our tutorial on restricting checkout by ZIP code covers lists, ranges and prefix matching.

Undeliverable or restricted regions

Some destinations cost far more to reach than your shipping rates assume, or are excluded for regulatory reasons. Common examples include remote islands, overseas territories and military addresses. Shopify's shipping zones control where rates exist, but a validation rule gives the customer a clear explanation instead of an empty shipping step.

Freight forwarders and reshippers

Forwarding warehouses receive parcels and send them on, often abroad. Many forwarder customers are legitimate, but forwarders also appear in fraud, because they hide the real destination. Signals include known forwarder addresses, suite or unit numbers that look like customer IDs, and a billing country that differs from where the forwarder is. Read our guide to blocking freight forwarders and reshippers before deciding how strict to be.

Signs of address manipulation

Fraudsters sometimes alter addresses slightly to get past blocklists: extra spaces, swapped characters, a different apartment number on the same building. Exact-match rules miss these. Our post on detecting address manipulation fraud covers how to normalize addresses before comparing them.

Block or warn?

Not every address issue deserves a hard block. A useful way to decide:

IssueUsual actionWhy
PO box when carrier can't deliverBlockThe order can't be fulfilled as entered
ZIP outside local delivery areaBlock or hide the delivery optionThe selected service isn't available
Restricted region or countryBlockYou can't or won't ship there
Missing house number, known formatBlock with a clear fixAlmost always undeliverable
Missing house number, unknown formatWarnLegitimate exceptions exist
ZIP format mismatchBlock with a clear fixUsually a typo the customer can correct
Known forwarder addressBlock, hide options or reviewDepends on your risk appetite

A block is a validation error. The customer can't continue until they change the address. A warning is a message that explains the problem but lets them proceed. Warnings inside the main checkout steps require a checkout UI component, which needs Shopify Plus. On other plans the practical alternatives are to block, to hide the affected shipping method with a delivery customization rule, or to flag the order for review after purchase.

Hiding is often gentler than blocking. If express courier can't reach PO boxes but standard post can, hide the courier option for PO box addresses rather than blocking the order.

Writing address error messages

The message decides whether the customer fixes the address or abandons the cart. Good address messages:

  • Say what is wrong in plain words.
  • Say how to fix it.
  • Offer an alternative when there is one.
  • Never accuse the customer of anything.

Some examples:

  • "Please add your house or building number to the address."
  • "We can't deliver to PO boxes. Please enter a street address."
  • "That postal code doesn't look right for the United Kingdom. Please check it."
  • "We don't currently ship to this area. Contact us if you think this is a mistake."

Avoid vague messages like "Invalid address" or "Order cannot be completed". Our post on error message UX has more examples.

Step-by-step setup

  1. List your real address problems. Look at the last few months of returned or delayed parcels and note the cause of each.
  2. Turn each cause into a rule with a condition, an action (block, hide or review) and a message.
  3. Scope rules by market so a format check for one country doesn't break another.
  4. Add an exception for staff and test orders, such as a customer tag that skips the rule.
  5. Test with real-looking addresses from every market you ship to, including rural and apartment addresses.
  6. Test through express checkout buttons, since they fill the address from the customer's wallet.
  7. Watch checkout completion at the shipping step for a couple of weeks after launch.

Pitfalls and edge cases

  • Express wallets sometimes send addresses with lines in a different order, so test checks against Shop Pay, Apple Pay and PayPal.
  • Customers write addresses in their own language and script. A Latin-only pattern will fail elsewhere.
  • Business addresses often have a company name in the first line and the street in the second. Check both lines for numbers.
  • A PO box rule that matches "box" anywhere will block "Boxwood Lane".
  • Over-blocking shows up as drop-off at the shipping step. Check your checkout funnel analytics after any new rule.

Doing it with Blockly Checkout Customizer

Blockly Checkout Customizer is live and free on the Shopify App Store. It includes ready-made templates for shipping address, PO box address and ZIP code rules, plus a custom rule builder for combining conditions such as country and customer tag. Each rule has its own customer-facing message, and shipping method rules let you hide an option instead of blocking the order.

Address rules run on Shopify Functions, so they work on all Shopify plans and apply to express checkout buttons and direct checkout links. If you want warning banners inside the checkout steps, that part needs Shopify Plus.

The takeaway

Address validation at checkout is cheap insurance against failed deliveries. Start with the problems you actually see in returned parcels, block only what is truly undeliverable, hide options where a different method would work and write messages that tell the customer exactly what to change. Then watch the shipping step for drop-off and adjust.

Frequently asked questions

Does Shopify validate addresses at checkout by default?

Partly. Validate shipping address only suggests corrections, while the Address format validation checkout rule can block PO boxes, parcel lockers and regex patterns for every order. Rules that depend on the product, shipping method, customer or ZIP code still need a validation function from an app.

Do I need Shopify Plus to block addresses at checkout?

No. Validation rules from a public app built on Shopify Functions work on all plans. Plus is only needed for UI components, such as warning banners, inside the main checkout steps.

Should I block or warn when an address has no house number?

Block with a clear message in markets where addresses always have numbers. Warn, or review after purchase, in markets where named properties or other formats are common.

Do address rules apply to Shop Pay and Apple Pay orders?

Yes, when they are built as validation functions, because the check runs inside checkout regardless of how the customer arrived.

Up nextWhat You Can Customize in Shopify Checkout on Each Plan (2026)

Related articles

More tutorial articles →
Free forever plan

Ready to protect
your store?

Join 5,000+ Shopify merchants. Install in 30 seconds and block your first bad actor today.

  • No credit card
  • 5-minute setup
  • Cancel anytime