GeoIP Redirect settings
This page describes extension's configurations, which are located in Stores -> Configuration -> GeoIP Redirect.
General settings
- Enable module: defines whether the module is active.
- Display popup with redirect notice: defines how users will be notified about redirection:
- No: no message is shown before redirecting.
- Confirmation popup: shows a redirection notification with ability to hide, decline or accept redirect. The closed pop-up will reappear after the next page load.
- Notification popup: shows a redirection notification with ability to hide or accept redirect. The closed pop-up will reappear after the next page load.
- Popup text: appears when Confirmation popup or Notification popup is selected. Sets the message shown in the redirect popup.
- Ajax mode: enabled AJAX mode for redirect popups. Recommended to enable if varnish cache is used.
- Redirect data storage: sets the storage location for redirect data. It can be kept in Session or in Cookies.
- Storage lifetime: sets the lifetime of redirect data in seconds. If empty, default settings will be used (Stores -> Configuration -> General (Web tab) -> Default cookie settings).
- Remote IP key: specifies which key (field) the server should use to retrieve the visitor’s IP address.
note
In some cases, the real IP address of a user can be hidden behind a proxy server, load balancer, CDN (like Cloudflare), or another intermediary service. In such situations, the standard REMOTE_ADDR field may contain the IP address of the proxy server, not the actual visitor.
Country lookup
- The lookup source: defines the source for IP-based location lookups:
- GeoLite2 database: a server-stored database containing locations. Executes location lookups faster, but requires periodic updates.
- ip-api.com: the module sends requests to ip-api.com site to define the location of the customer.
- Debug mode: enables the debug mode to test redirects:
- Debug client IP: sets the real IP address of the machine where debugging is executed.
- IP to debug: sets the IP address used to simulate the request from it.
note
List of IPs for tests:
64.20.55.251 - USA
80.70.47.234 - France
78.77.22.112 - Sweden
90.77.22.112 - Spain
122.160.97.235 - India
93.244.173.229 - German
Limitations
- Ignored IPs: defines ignored IPs which will be excluded from redirect handling. Multiple addresses should be separated by comma.
- Ignored user agent: defines user agents that should be ignored and excluded from the redirect process.
note
Since agents can execute
.jsfiles, they can make requests, which will be blocked by the extension. - Allow redirect by parameter: allows redirects for requests containing the Parameter. Can't be blocked by Ignored IPs and Ignored user agent settings.
- Parameter name: defines parameter name. This is the first part of the key-value pair; for example, in the case of
?category=electronicsit iscategory. - Parameter value: defines parameter value. This is the second part of the key-value pair; for example, in the case of
?category=electronicsit iselectronics.
- Parameter name: defines parameter name. This is the first part of the key-value pair; for example, in the case of
- Process actions only on the first visit: redirects user only on the first visit. Checks the redirect data stored in Session or in Cookies.