Block countries and regions

Show visitors from chosen countries or regions a stop page, and refuse checkouts to those places.

O

Written by Ongoing Apps - Local Dev

Updated Oct 30, 2026 5 min read

Country blocking shows visitors from places you choose a stop page instead of your store: a red stop sign with your own heading and message. You can block whole countries or individual states and provinces, and also refuse checkouts to those places.

Set it up

  1. In Ongoing Defender, open Visitor protection, then Countries & regions.
  2. Under Who sees the stop page, choose Visitors from the places I choose, or Everyone except visitors from the places I choose to keep your store to the places you list.
  3. Search for a country and tick it, or click Choose states or provinces to pick areas inside it. Your choices appear as tags you can remove.
  4. Edit the stop page's heading and message. The preview beside the form shows exactly what blocked visitors will see.
  5. Switch on Turn on country blocking and click Save in the bar at the top of the page. Every change on this page, including the switch, is saved the same way.

You can do these in any order. Country blocking can be switched on before you choose any places; until you add one, nobody is blocked and the banner says so.

The banner at the top of the page always describes what's live on your store, such as "Visitors from United States see the stop page". Saved changes reach your store within a minute, and visitors who were already browsing get the new settings on their next page.

The page also shows where you're browsing from. If your settings would block you, click Exclude my IP so you can still reach your store.

See the stop page on your store

Click View stop page on my store under the preview. Your store opens in a new tab showing the stop page with your saved text, for that page only. It works whether or not country blocking is on, and nothing changes for your visitors.

The stop page

The stop page shows a red stop sign with a raised hand above your heading and message. Visitors can't select or copy its text, right-click it, or drag or long-press the sign. Until you write your own, the stop page says "Access denied" and "This store isn't available in your location. If you think this is a mistake, please contact the store owner." A small "Protected by Ongoing Defender" link sits underneath. To hide it, clear Show "Protected by Ongoing Defender" in the Stop page section and save.

Who always gets in

  • Visitors from IP addresses on Trusted access, and logged-in customers you've trusted by email or tag.
  • Devices you've given an access link.
  • Search engines and link previews, so your store stays in search results and shared links still show a preview: Google (including Google Shopping), Bing, DuckDuckGo, Apple, Yandex, Baidu, Facebook, LinkedIn, Pinterest, X (Twitter), Slack, Discord, WhatsApp, Ahrefs and Semrush. Performance tools such as Lighthouse are checked like any visitor.
  • You, in the theme editor.
  • Anyone we can't place. If a visitor's location is unknown, or Ongoing Defender can't be reached, the store opens rather than risk turning away real customers. In "everyone except" mode, a visitor whose state or province is unknown gets in if part of their country is allowed.

To also block visitors on Tor, VPNs or datacenter networks, wherever they are, see Block VPNs, proxies and Tor.

Refusing orders too

A visitor can hide their location with a VPN, so the stop page alone can be got around. Switch on Also refuse orders to blocked places to refuse those orders at checkout, including Shop Pay, Apple Pay, Google Pay and PayPal express checkouts.

  • When you block places, an order is refused if it ships to or is billed from a blocked place.
  • When you only let places in, an order is refused if it ships outside your list (the billing address counts when nothing ships).

Refusing orders runs through checkout rules, so they need to be switched on under Checkout protection; the page tells you if they're off. Blocked buyers see your checkout message. Use Test a checkout to try a country or state. Your always-allow emails and tags still win.

How locations are worked out

When country blocking is on, your store asks Ongoing Defender whether the visitor is in a blocked place, and remembers the answer for the rest of the visit until you change your settings. We look up the visitor's IP address in a local copy of DB-IP's IP-to-City Lite database on our own server. The address isn't stored and isn't sent to anyone else, and your list of places never appears in your store's code.

IP locations are approximate: they're usually right for the country, less often for the state or province, and VPNs and some mobile networks place people elsewhere. That's why refusing orders matters for anything you must enforce.

While the check runs, the first page of a visit waits up to two seconds before it appears, so blocked visitors don't glimpse your store. Later pages in the same visit don't wait.

States and provinces

These are the states, provinces and similar areas Shopify uses in addresses. For countries whose addresses don't use them, such as the United Kingdom and France, you can block the whole country only.

In Italy, Spain, Ireland and the Philippines, Shopify's areas are provinces or counties, but visitor locations only tell us the larger region around them. There, the provinces or counties you choose apply at checkout only. Choose the whole country to cover your storefront too.

IP Geolocation by DB-IP

Related articles

Still need help?

Our team usually replies in a few minutes.

© Ongoing AppsPowered by OngoingAI
Block countries and regions · Ongoing Defender Help Center