Redirecting EU visitors: the EU shorthand and rule order
By Beacon Wave Studio · · 8 min read
Most stores that sell into Europe end up with the same sentence in their heads: "if they are in the EU, send them to the EU store." It sounds like one rule. Typed out as country codes it is twenty-seven, and the moment you start typing them you hit the questions: is Switzerland in? What about the UK now? Does Norway count? And once the rule exists, the next question follows a week later: "except Ireland, which should go to the UK store because that is where we ship it from."
GeoBeacon has a shorthand for the first part and a matching order for the second. This post explains exactly what the shorthand expands to, which countries it deliberately leaves out, how the script chooses between rules when more than one could apply, and how to build the common European set-ups, including the exceptions, without surprises.
What EU expands to
The countries field on a rule accepts ISO country codes separated by commas, spaces or semicolons, plus two special tokens. The asterisk means everyone else, and EU means the 27 member states of the European Union. When you save a rule containing EU, GeoBeacon replaces the token with the member codes: AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES and SE. The rule list then shows the first two country names and "+25 more", and the stored rule is a plain list of codes with no memory that it came from a shorthand.
That last point matters in one direction: the expansion happens when you save. If the Union gains or loses a member, existing rules keep the list they were saved with until you edit them, which is what you would want; a rule should not change under you because a treaty was signed. New rules typed after the app's list is updated get the new membership.
A code the app does not recognise is rejected when you save, with the message "Unknown country code" and the offending token, so a typo such as UK (the ISO code for the United Kingdom is GB) does not silently become a rule that never fires. Duplicates within one rule are collapsed, so typing EU and then DE again is harmless.
Who is not in EU, on purpose
The shorthand is the political Union and nothing more, because that is the only definition with a fixed answer. Everything that is "European" in a looser sense has to be added by hand, and it is worth going through the list once:
- The United Kingdom (GB) left the Union in 2020. Most stores give it a rule of its own, either to a UK store or to a market priced in pounds.
- Switzerland (CH), Norway (NO), Iceland (IS) and Liechtenstein (LI) are in the single market or in EFTA but not in the Union. Whether they belong with your EU rule depends on where you ship them from and in which currency, which is a logistics question, not a geography one.
- Microstates: Monaco (MC), Andorra (AD), San Marino (SM) and Vatican City (VA) are not members, although parcels to them travel through France and Italy. Add them to whichever rule handles their neighbour.
- Candidate and neighbouring countries: Turkey, Serbia, Ukraine, Moldova and the Western Balkans are outside the Union and usually belong with your rest-of-world handling.
- Outermost regions and overseas territories. Shopify lists several territories that are legally part of the Union as separate countries: Guadeloupe (GP), Martinique (MQ), French Guiana (GF), Réunion (RE) and Mayotte (YT) among them. They are not in the EU shorthand because they are not in the ISO list for the member states. If you ship to them, add their codes; if you do not, leaving them out means visitors there see whatever your catch-all does. The Canary Islands, Madeira and the Azores, by contrast, are detected as Spain and Portugal and are covered.
None of this is about VAT or customs. The rule decides where a visitor is sent based on where Shopify detects them to be; what you charge them is decided by your Shopify Markets settings on the destination. The two usually line up because you set them up together, but the rule does not read the tax settings and the tax settings do not read the rule.
How a visitor is matched to a rule
Once the visitor's country is known, GeoBeacon walks the rule list from top to bottom and stops at the first enabled rule whose country list contains that code. That is the whole algorithm, with one refinement for the catch-all: a rule containing the asterisk is remembered as the fallback and only used if the walk finishes without a specific match. So a specific rule placed below the Everyone else rule still wins for its own countries. The order of the catch-all does not matter; the order of specific rules does, but only where they overlap.
Disabled rules are skipped entirely. A rule you have switched off neither matches nor counts as the fallback, which makes disabling a safe way to test "what happens without this rule" on a live store without deleting anything.
When two enabled rules list the same country, the rules page shows a warning headed "Overlapping rules" that names the countries involved and reminds you that only the first matching rule is used. The warning is informational, not a blocker. Sometimes an overlap is a mistake, two rules both typed with EU; sometimes it is exactly the point, as the next section shows.
Carving exceptions out of EU
Because the first matching rule wins, exceptions are made by placing a narrower rule above the broad one. The Ireland case is the classic:
- Rule 1: IE, switch to the UK market (or the UK store's URL).
- Rule 2: EU, switch to the EU market or store.
- Rule 3: GB, switch to the UK market or store.
- Rule 4: *, stay or go to the international store.
Rule 1 and Rule 2 overlap on Ireland and the warning says so. An Irish visitor is caught by Rule 1 and never reaches Rule 2. If you later move Rule 2 above Rule 1 with the arrows, Irish visitors start going to the EU store and the warning is your only hint why. Treat the overlap warning as a checklist: every country it names should be one where you can say which rule you meant to win.
The same pattern handles a market that is priced differently for one member state (a German-only market above an EU-wide one), a country you do not ship to at all (a rule sending it to a distributor, above the EU rule, as in redirecting countries to a distributor), or a bilingual country that needs a language as well as a market, which is its own topic in language versus country.
What the EU rule should point at
The destination is where EU set-ups differ most, and the right choice depends on how your Europe is built in Shopify.
One EU market with many countries. Point the rule at a market target and choose "Detected country". Each visitor is switched to their own country within your markets, so a French visitor browses in euros with France's shipping rates and a Polish visitor gets Poland's. This is the recommended target because it never sends two countries to a third country's pricing. If the detected country is not offered by any of your markets, nothing happens, and the debug output reports country-not-offered. The reasons a market switch can be silently declined are listed in the redirect-not-working checklist.
One EU market that is really one country. If your Europe is a single market whose pricing is set for, say, Germany, and you want every EU visitor to see it, pick that country as the target instead of Detected country. Shopify can only switch a shopper to a country the market actually offers, so if the market lists only Germany, "Detected country" would do nothing for a Dutch visitor while a fixed DE target works.
A separate EU store on its own domain. Point the rule at a URL target with the store's address and turn on Keep path, so a visitor on /products/oak-table lands on the same product on the EU store. Keep the EU store's domain in the other store's known hosts list so visitors who deliberately cross between the two are not bounced back, which is what the referrer rule handles.
Popup or redirect for EU traffic
Two things push European set-ups towards popup mode rather than automatic redirect. The first is law: the EU's geo-blocking regulation requires that a customer who is redirected to a country version of a site has given explicit consent and can still reach the version they originally asked for. A popup that asks and remembers the answer is the natural fit; an automatic redirect needs more care. The detail is in the geo-blocking regulation and country redirects. The second is the sheer number of borders: a Belgian shopper living near Lille, a German-speaking Italian in Bolzano, a Luxembourg commuter. Detection by network location is right for most people and wrong for enough of them that asking beats deciding.
Whichever mode you choose, the EU rule is just one rule in a list that is read from the top. Write the exceptions first, the broad rule after, the catch-all wherever it reads best, and let the Overlapping rules warning tell you when two of them disagree about a country. GeoBeacon expands EU so you do not have to type twenty-seven codes, and leaves everything outside the Union for you to place on purpose.
Frequently asked questions
Which countries does the EU shorthand include in GeoBeacon?
The 27 member states of the European Union: Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, the Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain and Sweden. It does not include the United Kingdom, Switzerland, Norway, Iceland or any other European country outside the Union; add those codes to the rule yourself if you want them treated the same way.
How do I send all EU visitors to one store but Ireland to another?
Create a rule for IE above the EU rule. Rules are checked top to bottom against the detected country and the first rule that lists it wins, so Ireland is caught by its own rule before the EU rule is reached. GeoBeacon shows an Overlapping rules warning naming Ireland, which in this case is the behaviour you wanted; the warning is there so that the overlap is deliberate.
Does the Everyone else rule have to be last?
No. The catch-all is only used when no rule names the detected country, wherever it sits in the list. A specific rule below it still wins for its countries. Putting it last is still a good habit because it reads clearly, but moving it will not change what happens to anyone.
Why did an EU visitor see nothing when my EU rule points at a market?
The usual reason is that the destination market does not offer the visitor's country. A market target switches the shopper to a country within your Shopify Markets setup, and if that country is not in any market the script stops with the reason country-not-offered. Check your market's countries in Shopify, or point the rule at an external URL if the EU store is a separate shop.