How to ensure the extension works
This page describes several ways of verifying your extension is working.
Method based on country considered rule
1. Enable the module and configure the main settings
Go to Stores -> Configuration -> GeoIP Redirect and make sure the Enable module option is enabled. For clarity, select Display popup with redirect notice, such as Notification popup or Confirmation popup, so you can see the redirect notification and confirm that the module responds to the rule. In the Popup text field, enter a test message, for example: You are being redirected for testing purposes.
2. Create a test redirect rule by country
Go to System -> GeoIP Rules and click Add New Rule, then fill in the fields: in Name, enter something like Test redirect by Country
, make sure the rule is Active, and set the Priority, for example, 1. In the When visitor section, select Country and choose your current physical location (don't forget to temporarily disable VPN) , and in the What to do section, enable Redirect to URL and enter, for example, /test-redirect.html
in the corresponding field. After that, save the rule.
3. Check the result
Open the site from an IP address that is identified as the selected country, and if everything is set up correctly, you should see a popup with your test message and/or be redirected to the specified URL.
Method based on IP considered rule
1. Enable the module and configure the main settings
Go to Stores -> Configuration -> GeoIP Redirect and make sure the Enable module option is enabled. For clarity, select Display popup with redirect notice, such as Notification popup or Confirmation popup, so you can see the redirect notification and confirm that the module responds to the rule. In the Popup text field, enter a test message, for example: You are being redirected for testing purposes.
2. Enable debug mode
Enable Debug mode, then enter your real IP address in the Debug client IP field. In the IP to debug field, you can specify any test IP address you want to simulate requests from (you can find test IP addresses in the hint). This allows you to check how the rule works for different IP addresses, regardless of your actual location.
3. Create a test redirect rule by IP
Go to System -> GeoIP Rules and click Add New Rule, then fill in the fields: in Name, enter something like Test redirect by IP
, make sure the rule is Active, and set the Priority, for example, 1. In the When visitor section, select Country which test IP address you have used in the IP to debug configuration. In the What to do section, enable Redirect to URL and enter, for example, /test-redirect.html
in the corresponding field. After that, save the rule.
4. Check the result
Open the site with the debug mode enabled and the test IP address specified. If everything is set up correctly, you should see a popup with your test message and/or be redirected to the specified URL.
Method based on the 3-rd party VPN
In this example Opera browser with built-in VPN will be used.
1. Enable the module and configure the main settings
Go to Stores -> Configuration -> GeoIP Redirect in your Magento admin panel and make sure the Enable module option is enabled. For visibility, set Display popup with redirect notice to either Notification popup or Confirmation popup so you can see the redirect notification in action. Enter a test message in the Popup text field, for example: You are being redirected for testing purposes.
2. Create a test redirect rule by country
Go to System -> GeoIP Rules and click Add New Rule, then fill in the fields as follows: for Name, enter something like Test redirect by Country
, make sure the rule is Active, set the lowest Priority. In the When visitor section, select Country and choose the country you want to test (for example, USA), and in the What to do section, enable Redirect to URL and enter a test URL, such as /test-redirect.html
. Save the rule after entering all the details.
3. Enable and configure Opera’s built-in VPN
Open your Opera browser and click the VPN icon in the address bar, or go to Settings -> Privacy & Security -> VPN and Enable VPN. Once VPN is enabled, click the VPN icon and select the virtual location (country or region) you want to test. Opera’s VPN may offer options like Europe, Americas, or Asia, so choose the region that matches your rule as closely as possible.
4. Test the redirect
With Opera VPN enabled and set to the chosen country or region, open your website in a new private window to avoid cached data or cookies. Navigate to your site’s homepage or any page that should trigger the redirect, and if everything is configured correctly, you should see the popup with your test message and/or be redirected to the specified test URL.
If the redirect does not occur, double-check your rule’s conditions, the selected VPN region, and clear your browser’s cookies or cache, or try a new private window. Note that Opera’s VPN may not always allow you to select an exact country—if only regions are available, use the region that is most likely to include IPs from your target country. Before testing the redirect, you can verify your current IP and location using services like whatismyip.com.