How to exclude specific URLs from geolocation processing
Some pages have to be served exactly as they were linked: invite-only landing pages, campaign and press pages, legal notices, or pages where the store view is chosen deliberately for each recipient. On such pages a geolocation rule that switches the store view or redirects the visitor would break the experience.
The Excluded URLs setting keeps these pages out of the extension's processing completely, while all your rules keep working everywhere else.
What exclusion means
When the requested page matches one of the excluded patterns, the extension performs no actions at all on that page:
- no Change store view and no Switch currency;
- no Redirect to URL and no Restrict access;
- no confirmation or notification popup.
In addition:
- The excluded page is not counted as the visitor's first visit, so Process actions only on the first visit still has its one chance to work on the next page that is not excluded.
- The exclusion outranks Allow redirect by parameter — an excluded page stays excluded even when the request contains the configured parameter.
Because an excluded page is exempt from all actions, visitors from restricted countries can reach it even if a Restrict access rule exists. Do not exclude pages that must stay unavailable for legal or licensing reasons.
1. Add the URL patterns
Go to Stores -> Configuration -> IP Geolocation Redirect -> Limitations and fill in the Excluded URLs field. Enter one URL path pattern per line, for example:
/next-chapter
/promo/*
Save the configuration and clean the Magento cache, so that the change also applies to the pages that were already cached.
The field is configured per website. Use the scope switcher in the top-left corner of the page to set different patterns for different websites, or keep them in Default Config to apply the same list to the whole installation.
2. How patterns are matched
- Enter a path, not a full URL. The path is what follows your store domain, for example
/contact. A pastedhttps://example.com/contactnever matches. - The leading and trailing slashes do not matter:
/contact,contact, and/contact/mean the same thing. - The query string is ignored, so
/promo/spring2026also covers/promo/spring2026?utm_source=newsletter. - Matching is case-insensitive:
/contactalso covers/Contact. - A pattern without a wildcard matches the page exactly:
/contactdoes not cover/contact/thank-youor/contact-us. Add*to cover a group of pages. *stands for any part of the path and can be used anywhere in the pattern:/promo/*,/press*,/press/*/pdf.- Catch-all patterns (
*,/*,/) are rejected when you save the configuration, because they would exempt every page and effectively disable the extension.
Examples
| Pattern | Matches | Does not match |
|---|---|---|
/contact | /contact, /contact/, /Contact, /contact?utm_source=mail | /contact/thank-you, /contact-us |
/contact/* | /contact/thank-you, /contact/form/success | /contact |
/promo/* | /promo/spring2026, /promo/spring2026/details | /promo |
/press* | /press, /press/kit, /press-releases | /company/press |
/press/*/pdf | /press/2026/pdf | /press/pdf |
To exempt both a page and everything under it, add two lines: /contact and /contact/*.
3. Store views and store codes
If store codes are used in your URLs, they define how widely a pattern applies:
- A pattern without a store code applies to every store view of the website.
/next-chaptercovers/next-chapter,/en_us/next-chapter, and/en_gb/next-chapter/. - A pattern that starts with a store code applies to that store view only.
/en_au/next-chapterexempts the page on the Australian store view, while the same page on the other store views is still processed by your rules.
Use the second form when a campaign page must stay untouched in one language only, and the first form when the page has to be exempt everywhere.
4. Check the result
- Enable Debug mode in the Country lookup group, enter your real IP address in Debug client IP, and put a test IP from another country in IP to debug (for example,
64.20.55.251for the USA). Clean the cache. - Open a page that is not in the list — the rule created for that country should fire as usual: you see the popup and/or get redirected.
- Open an excluded page — the page opens normally, with no popup and no redirect.
- Turn Debug mode off when you are done.
You can also open the page source (Ctrl + U on Windows, ⌘ + Option + U on Mac) and search for mst_geoip. On an excluded page the extension's script is not present at all.
Troubleshooting
The page is still redirected. Check that you entered a path and not a full URL, and that the pattern is not stricter than the page you want to cover — /promo alone does not cover /promo/spring2026, you need /promo/*. Then make sure the patterns are saved in the scope of the website the page belongs to, and clean the Magento cache.
The exclusion works on one store view only. The pattern starts with a store code. Remove the store code from the pattern to exempt the page on every store view of the website.
Nothing is redirected anywhere anymore. A pattern is too broad — a short prefix with a wildcard, such as /e*, matches most of the catalog. Make the pattern more specific.
The configuration is not saved and an error is shown. The message The pattern ... would exclude every page and disable the module. Enter a more specific path. means one of the lines is a catch-all pattern (*, /*, or /). Replace it with a concrete path. If you need to switch the extension off completely, set Enable module to No instead.