GeoIP Redirect for Magento 2
- Automatically detect users’ location
- Redirect visitors to appropriate store view or custom URL
- Restrict redirection for particular IP addresses
- Display prices in visitor's local currency
- Ignore user agents
Magento 2 GeoIP Store Switcher is the tool to enter the international e-commerce market by adapting store information to a customer location. Broaden your business horizons to other countries and let your foreign customers shop easily with multi-language, multi-currency and multi-store functionality with Magento 2 GeoIP extension.
Improve shopping experience of your foreign customers
Display confirmation pop-up before redirecting
Set introducing confirmation and notification pop-up before redirecting. Comply with the requirements of EU regulations regarding geo-blocking and country redirects.
Redirect users to a specific store view
Automatically determine visitors’ location and redirect them to the correct store view. With the help of the extension you can improve customers' shopping experience by showing localized information in familiar language and currency.
Change currency based on visitors’ location
The Magento 2 GeoIP extension detects the location of your store visitors and changes price currency to the one which is actually used in the potential customer’s country. Also, your customers don’t have to choose the language prior to starting purchasing - it will be done automatically.
Restrict access to your website to specific IP addresses
With Magento 2 GeoIP Redirect Extension, you can block certain visitors by their IP addresses and choose the CMS page that will be displayed to the restricted customers.
Ignore search engines and user agents
Avoid unwanted redirects for user agents and search engine spiders. You can specify which of them to ignore. For your convenience, the most popular search engines like Google, Yahoo, Bing, etc. are ignored by default.
Redirect only from the home page
Sometimes a user may need to see particular pages of your store just as they are. In that case, you can enable the ‘Redirect From Home Page Only’ option. Thus, as soon as viewers enter the website homepage, they would be automatically redirected to the appropriate store view.
FLEXIBLY ADJUST REDIRECTION OPTIONS
Set Magento 2 GeoIP redirects to specific URLs
Use this option to redirect your customers to a specific store page, blog or youtube channel based on their location. For example, if you don’t provide delivery of some items to specific countries or regions, you can redirect users from these regions to the page with the information where they can buy this product offline or find out more about your company.
Restrict redirection for particular URLs
In case you want to keep the URLs like home or FAQ page the same for all store views, you can exclude them from redirection. At the same time, you can apply redirect option only to certain store pages, e.g. Delivery info or Contacts.
Redirect users for each visit or only for the first one
Choose whether to adjust your Magento 2 webstore to users’ geolocation and redirect them automatically or to allow them to choose which store version is more convenient. In this case, they will be automatically redirected only during their first visit and then will be able to choose which store view to use. This feature works for both guests and registered customers.
Restrict redirects by IP address
Sometimes you may need to allow certain people to see your web site as it is despite their location. For example, when some of your staff work remotely from different countries. In this case, use Magento 2 GeoIP store switcher to specify their IPs in the module’s settings.
How to make Varnish Cache compatible with redirects?
Due to the App Server utilization, GeoIP Redirect and Varnish Cache are compatible only with particular limitations. To bring partial compatibility, you may use the following solution:
1. Find the Varnish Cache configuration file on your server (usually -/etc/varnish/default.vcl).
2. Add the following code to this file:
if (req.http.cookie !~ "PHPSESSID=") {
return (pass);
}
3. Make sure that the First visit redirect only option is set to Yes. Otherwise, you will be unable to use redirects.
Also keep in mind that your store will be displayed without cache during the first visit.
More content management tools with Blog Pro
Speak the same language with your customers using our Magento 2 Blog plugin. Let your visitors share their opinion in comments and establish a dialog with their vendor.How to configure Magento 2 multi-currency?
- Given the extension is installed and enabled, go to GeIp Redirects > Country to Currency Switch;
- fill the fields as follows:
- Enable Country --> Currency - Yes
- Country to Currency Mapping - choose Country, say, US, then, Currency - US Dollars, click Add;
- if you added a country/currency by mistake click trash under Action and that's it;
- switch between the indicated countries’ IPs using a VPN to verify it works as needed.
-
Basicly, GeoIP redirect module is the Magento 2 extension and is not compatible with Varnish Cache. Magento 2 utilizes App Server and when you use Varnish Cache for your website the redirect functionality will not work properly. However, you can bring partial compatibility.
Read the FULL answer -
Sometimes, it is unable to complete the database import due to execution time limit of PHP scripts. You can avoid this error by increasing the maximum execution time for your PHP scripts.
Read the FULL answer -
You can use a VPN service or an anonymizer to change your authentic IP address to a required one (geolocation) and see whether everything works smoothly. Read on to see all the possibilities.
Product questions
How can I make Varnish Cache compatible with redirects?
How to fix the execution time limit of PHP scripts when importing the database?
How can I test redirects for different countries in M2?

Other Features
- 100% Open Source — Easy To Customize
- Follows Magento Code Architecture
- Separated HTML/CSS/JS
- Simple installation via Composer



Could it be possible to implement the browser language as a choice for switching?
Currently we have several storeviews for a country which has more than 1 official language. The geo-ip sometimes does crazy things like redirecting to be_nl/fr_nl/something when two storeviews are linked to the same country.
Maybe using the browser language we could prevent this from happening?
Kind regards
you'll be logged in automatically
Redirect customers to a certain store view according to their geo-location
Are you looking to add specific functionality for this extension or want to acquire a reliable development partner altogether? With custom development services by Amasty, you will receive high quality and cost-effective solutions developed by Magento professionals according to industry’s best practices.
2.3.6, 2.3.6-p1, 2.4.0-p1, 2.4.1, 2.4.1-p1, 2.4.2
You can always download the recent version free of charge from your account
Installing an upgrade is easy — check now
- Compatibility now the extension is compatible with Magento 2.3.6-p1 and 2.4.2
- Fix we fixed the issue with the required version of Amasty_Base extension
- Fix we resolved the problem with redirect from home page only
- Fix we fixed the issue with redirecting when a notification popup is enabled
- Fix we fixed the issue with the confirmation popup text taken not from the store view where redirect happens
- Compatibility compatibility with Magento 2.3.5 version was improved
- Fix we fixed the error caused by PARAM_NAME constant on Magento 2.2.7 version
- Fix we fixed the issue with showing a redirect popup if the page was cached
- Fix we fixed the issue with locale changing before redirect confirmation
- Fix we fixed the issue with redirection on product pages with different URL keys.
- Fix we fixed the issue with redirection by IP in Magento Commerce 2.3.4
- Fix we fixed the issue with the possibility to save empty multiselect value
- New now it is possible to edit the redirection popup text with the help of WYSIWYG editor
- Fix the issue with redirect users from Home Page was resolved
- New unit tests were added to the Geo IP Data module
- Improvement the code of the Geo IP Data module was refactored
- Compatibility the compatibility of Geo IP Data module with Magento 2.1.x was enhanced
- Improvement IPv6 support was added to Geo IP detection.
- Improvement the possibility to upload the latest Geo IP Database was added
- New introducing confirmation and notification pop-ups before redirecting. Comply with the requirements of EU regulations regarding geo-blocking and country redirects
- New the possibility to restrict the access to a website by IP address was added
- Improvement minor visual improvements for the extension settings in the admin panel were implemented
- Improvement minor code improvement
- Compatibility the compatibility with the Magento Full Page Cache was enhanced
- Fix the issue with the redirection on product/category pages malfunction was resolved
- Fix the issue with wrong geolocation detection was resolved
- Fix the issue with the error when IP address fails to be found in the DB was resolved
- Fix security issues were resolved
- Fix the issue with the "too many redirects" error while selecting a store view was resolved
- Fix the "Warning: strpos(): Empty needle" error in var/report was resolved
- Improvement the location detection via GeoIP data was improved
- Improvement for EU's GDPR compliance the restriction for the last IP address's digit was implemented
- Fix the issue with URL replacing was resolved
- Fix the issue with the incorrect redirect to categories and products when using different URLs for stores was fixed
- Fixed an issue with the wrong store scope
- Compatibility with the FPC extension is added.
- Improved IP address check.
- Improved import of GeoIP data.
- Minor improvement for the "Apply Logic To" option.
- All URLs" option is deactivated.
- All Except Specified URLs" option is active by default.
- We added URLs excepted by default .
- Restriction by Ip" is renamed to "IP to Ignore" for better understanding.
- Performance optimization.
- Fix setting "First visit redirect only" didn't influence on setting "Enable Country --> Currency"/"Enable Country --> Store View". For repeat visit currency/store were the same.
- Fixed loop redirection if option "First visit redirect only" has value - yes, and urls like http://somesite.com/intl/;
- Fixed redirect after redirect;
- Fixed error: Setting "Currency" in "Enable Country" didn't work if was activated "Apply Logic To" - "Redirect From Home Page Only";
- Fixed currency switch on inconvenient URLs when "Apply Logic To - Specified URLs" + "Enable Country" set Currency;
- Improvements for detecting IP address
- Improvements for redirecting specific country to specified store
- Few performance optimizations
- Better compatibility with full page cache
- Minor code refactoring
- Possibility to enable/disable extension per each store