Since the version 2.0, Zeno theme has integrated GeoLite2 data created by MaxMind.
Because you can only have a single store for a specific Amazon country, this feature allows you to redirect the traffic from different countries to specific URLs.
This is very useful if your site receives international traffic because you can create multiple Zeno stores and redirect the visitors to the site that promotes Amazon products from the Amazon site in their country.
The GeoLite2 database is not 100% accurate since it’s based on a collection of IP addresses, but should redirect the users to the correct URL in the majority of the cases.
Creating a Geo-redirect
Go to Zeno->Geo-Redirect
Once on that page, you will need to first enable the Geo-Redirect Feature, which is disabled by default.
After that option is enabled, a few other options will appear.
The first option “Add a country redirect rule” is the place where you need to add the redirection rules. You can add as many rules as you want. To add more input fields for more redirect rules, click the “Add Redirect Rule” button. To remove a redirect rule, click the “Remove” red link from the right side of the field.
Make sure you add each redirect rule in this format:
Country Code|the URL where you want the traffic from that country to be redirected
Here’s a real example.
Let’s say I’d want to redirect the traffic from Australia to http://au.example.com
The redirect rule should be like this:
You can find the complete list of the country codes to the “ISO Country Codes” list. The country codes are the 2 characters before the comma and the country name.
Make sure you don’t copy the comma (,) or any blank spaces along with the country code. Also, don’t forget to add the “|” between the country code and the URL where you want that traffic to be redirected.
The “Do not redirect selected user roles” option allows you to set specific user roles that would not be redirected when visiting your site.
If you don’t choose any user role, all the user who visit your site, including the logged in users and administrators will be redirected to the URLs set with the rules above.
For someone who is not logged in, the only URL where the redirect is disabled is the login page, accessible at http://example.com/wp-login.php.