Visser Labs – WooCommerce Plugins

  1. Home
  2. Knowledge Base
  3. Checkout Guard
  4. How to block customers by IP address in Checkout Guard

How to block customers by IP address in Checkout Guard

Some problem customers are hard to stop by name or email. They place an order, get cancelled, then come back with a new email address and a slightly different name. Their IP address, the network address their device uses to reach your store, often stays the same. Checkout Guard lets you block that address, or a whole range of addresses, so those orders are stopped at checkout.

This article shows you how to add an IP address to your Blocked Entries list, which address formats Checkout Guard accepts, and how to block a range with the * wildcard. To block by name or email instead, see Block customers by name or email in Checkout Guard.

Prerequisites

RequirementDetails
PluginCheckout Guard version 1.0.2 or later, installed and active. An active license gives you updates and support. For setup, see Getting started with Checkout Guard.
IP addressThe address you want to block. Open the order in WooCommerce → Orders to find the customer’s IP address in the order details.

An IP address can be shared. Customers on the same office, school, or mobile network may all appear to come from one address, so a block on that address stops all of them. Block an IP only when you’re confident it belongs to the customer you want to stop.

Add a blocked IP address

  1. Go to WooCommerce → Checkout Guard. The Blocked Entries tab opens by default.
  2. Click Add Entry (or Add First Entry if your list is empty). The Add Blocked Entry dialog opens.
  3. Enter the address in the IP Address field, for example 203.0.113.42.
  4. Click Save Entry.

An Entry created confirmation appears and the entry is added to your Blocked Entries list. Checkout Guard starts checking new checkout attempts against it straight away. There’s no separate switch to turn blocking on.

You don’t need to fill in a name or email. The dialog reads “You can block by name, email, IP address, or any combination. At least one field must be filled.” So an entry with only an IP Address is valid.

The Add Blocked Entry dialog with 203.0.113.42 typed into the IP Address field and its format hint underneath

Your new entry shows in the IP Address column of the Blocked Entries list. An entry with no address shows a dash in that column.

The Blocked Entries tab with the IP Address column highlighted next to the Email and Notes columns

Supported IP address formats

The IP Address field accepts a single address in either of these formats. An address without a * is an exact match.

FormatExampleWhat it blocks
IPv4203.0.113.42Only that exact address
IPv62001:db8::1Only that exact address

If the value isn’t a valid address, the dialog shows “Please enter a valid IP address (IPv4 or IPv6), or a wildcard pattern like 192.168.1.*” and doesn’t save it. Some values get past the dialog but show Failed to save entry when you click Save Entry. Examples are an IPv4 address with leading zeros, such as 192.168.01.5, or a malformed IPv6 address, such as 2001:db8:::1.

Keep in mind that IP matching is case sensitive. For an IPv6 address, enter it exactly as it appears in the order details, including upper or lower case letters and in the same short or long form. Otherwise Checkout Guard may not recognize the same address when the customer returns.

Block a range of addresses with a wildcard

To block a whole range, use * in place of one or more segments of an IPv4 address. For example, 192.168.1.* blocks every address from 192.168.1.0 to 192.168.1.255. The IP Address field shows this same example in its hint text.

The Add Blocked Entry dialog with the wildcard pattern 192.168.1.* typed into the IP Address field

A wildcard address follows these rules:

  • It has exactly four segments separated by dots.
  • Each segment is either a number from 0 to 255 or a single *.
  • At least one segment is a number. A pattern made only of wildcards is rejected.
  • Numbers don’t have leading zeros. Write 192.168.1.*, not 192.168.01.*.
  • Wildcards work with IPv4 only. IPv6 wildcards aren’t supported.
PatternValid?What it blocks
192.168.1.*YesEvery address starting with 192.168.1.
192.168.*.*YesEvery address starting with 192.168.
10.*.1.5YesAny address that has 10 first, 1 third, and 5 last
*.*.*.*NoRejected, because it would block every customer
192.168.*NoRejected, because it has only three segments
2001:db8::*NoRejected, because IPv6 wildcards aren’t supported

A wide range can block many real customers at once. For example, 192.168.*.* covers more than 65,000 addresses. Start with the narrowest pattern that stops the problem.

How IP blocking works at checkout

Whenever someone attempts to check out, Checkout Guard looks up their IP address and compares it with every entry in your Blocked Entries list. It reads the address the same way WooCommerce does, which covers common setups such as stores behind Cloudflare.

IP address blocking sits alongside name and email blocking. Any one of these matches blocks the order:

  • The customer’s billing first name and last name both match an entry.
  • The billing email matches an entry.
  • The customer’s IP address matches an entry.

That means an entry can use several fields, but each field works on its own. If you enter both an email and an IP address in one entry, a customer who matches either one is blocked. They don’t need to match both.

This check runs the same way on the classic checkout and WooCommerce’s Block Checkout. A blocked customer sees the message you set in Checkout Denial Message on the Settings tab. By default it reads “Sorry, you’re not allowed to place an order right now, please contact support.” To see everything that happens when an order is stopped, see How Checkout Guard blocks orders at WooCommerce checkout.

Edit or delete a blocked IP address

Find the entry in your Blocked Entries list and use the edit or delete icon in the Actions column. Clicking the delete icon opens a Delete this entry? confirmation, and you click Delete to remove the entry. You can change the IP Address the same way you’d edit any other field, and the same format rules apply. For the full steps, see Block customers by name or email in Checkout Guard.

Troubleshooting

A blocked IP address still gets through checkout
First, check that the address on the entry matches the one on the customer’s order. Checkout Guard only matches the address your store sees, so a customer on a VPN, a mobile network, or a different connection may show a new address. Next, if the entry is an IPv6 address, confirm it matches the order exactly, including letter case. If the customer keeps changing addresses, block them by name or email as well.
Save Entry won’t accept my IP address
Check the value for extra characters, a missing segment, or a number above 255. Remove any leading zeros, for example write 192.168.1.5, not 192.168.01.5. For a wildcard, use an IPv4 address with four segments and at least one number. Most invalid values show “Please enter a valid IP address (IPv4 or IPv6), or a wildcard pattern like 192.168.1.*”. A pattern made only of wildcards, such as *.*.*.*, shows “A field must include at least one literal character other than separators (@ and .), and use no more than 5 wildcard (*) characters”. An exact address with leading zeros, such as 192.168.01.5, or a malformed IPv6 address, such as 2001:db8:::1, shows Failed to save entry.
A legitimate customer was blocked by an IP entry
Delete the entry from the Blocked Entries list, or edit it to a narrower pattern. The customer can check out again on their next attempt. This usually happens when the address is shared or the wildcard range is too wide.

Frequently asked questions

Can I block an IPv6 range?
No. Wildcards work with IPv4 addresses only. You can block individual IPv6 addresses one at a time.
Can I block an IP address and an email in the same entry?
Yes. Either one can stop an order. A customer who matches the email or the IP address is blocked, so they don’t need to match both.
Will blocking an IP address stop someone using a VPN?
Not reliably. A VPN gives the customer a different address, so an entry for their home address no longer matches. If the same person keeps returning, also block their name or email.
Does blocking an IP address cancel orders the customer already placed?
No. Blocking only stops new orders at checkout. Orders placed before you added the entry stay as they are.
Is it okay to store IP addresses?
IP addresses count as personal data in many regions. The IP Address field reminds you to store them in line with your privacy obligations, such as GDPR. Only keep entries you have a reason to block, and delete them when you no longer need them.

Need more help?

Checkout Guard is a licensed plugin. If you run into trouble blocking an IP address, open a support ticket and our team will help you sort it out.

Was this article helpful?

Related Articles

Resources & Help