Back to Top

User Guide of Magento 2 IP Geolocation Extension

Updated 16 July 2026

Magento 2 IP Geolocation (Adobe Commerce) is a useful extension that detects the customers’ location based on their IP addresses.

It automatically redirects the customer to the relevant store view as per their country.

Magento 2 IP Geolocation extension basically helps out the customer by making a personalized user experience for them.

This happens by switching to the relevant store view and currency as soon as they visit the website from a different location.

After detecting their IP address as configured by the admin of the respective website.

This is a must to have feature to assist store owners to bring a better experience for customers during their shopping journey.

Note – 

  • Geocode and Reverse Geolocation services are used in our module.
  • To have these services you must have the Google API Key to make use of this extension. You can generate one by clicking  here
  • You need to enable billing for your google account project under which the API Key is created. For more information please visit  here
  • This module uses http://ipinfo.io/ third-party services to trace user location from IP Address.
  • If the API hit request on the website exceeds the allowed limit then the customer will be required to purchase the API key

Watch the below video tutorial to understand the extension workflow:

aUAcYa0YnrM

Features

  • Enhance user experience on shopping sites by allowing customers to purchase from their relevant store views.
  • Auto-detect visitor’s location via IP address.
  • Automatically redirect users to the relevant store view.
  • Allow/Restrict customers to switch store views.
  • Allow blocking customers by their country’s IPs
  • Redirect customers to a specific URL on viewing some restricted Product, Category or URL.
  • The admin can add a global restriction URL at which the customers will redirect if the store view is not mapped with any of the countries.
  • Switch the store view & currency based on the visitor’s location.
  • The extension is compatible with the Hyva theme.
  • GraphQl has been implemented for the extension.

Installation

The installation is quite simple just like the standard Magento 2 extensions.

From Webkul Store

#1 Download Module

Firstly, you need to log in to Webkul Store, go to My Account>My Purchased Products section.

Then verify and then download and extract the contents of this zip folder on the system.

#2 Upload Folder

Once the module zip is extracted, follow path src>app and then copy the app folder into the Magento 2 root directory on the server as shown below:

installation

#3 Run Commands

After uploading the module folder, you need to run the following commands in the Magento 2 root directory:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush

Configuration For Multi-lingual Support

For multilingual support, the admin will navigate through Store > Configuration > General > Locale Options.

Select the locale as English (the language into which the admin wants to translate his store content).

magento2-local-configuration

Magento 2 (Adobe Commerce) IP Geolocation Extension – Translation

If a user wants to translate their module from English to German, then they need to follow the path app/code/Webkul/IP Geolocation/i18n in their unzipped folder.

The user will get a CSV file with the name “en_US.csv”.

Now they will rename that CSV as “de_DE.csv” and translate all right side content after the comma in the German language.

After editing the CSV, save it and then upload it to the path app/code/Webkul/IP Geolocation/i18n where they have installed Magento2 on the server.

The module will get translated into the German Language. It supports both RTL and LTR languages.

Mpsplitorder-1-1
Mpsplitorder-2-1

The user can edit the CSV like the image below.

Marketplace Split Order For Magento2 Translation

Admin Configuration

After the successful extension installation, The admin navigates through Stores > Configuration > IP Geolocation > IP Geolocation Settings to configure the extension.

geoip configuration

The admin needs to make some changes in the general settings of the extension to set it up.

  • Enable:- The admin can Enable or Disable the extension.
  • Google API Key:- Enter Google API Key here as the Google API is used in the module for the geolocation.
  • IP Info Access Token: To get an access token, please visit here: http://ipinfo.io/

Note: For Google API Key, Please visit

  • Store View Change:- Allow or Restrict customers to change their store view from the store view change.
  • Currency change:- Allow or Restrict customers to change their currency from the Currency Change option.

Global IP Redirection –

If the Admin didn’t set any IP Geolocation redirection based on category, product or URL then the global URL will work for redirection.

Redirect Popup Setting –

The admin can set the popup message for the customers while redirection is in process. Thus, the same message will be displayed on the front end.

Google Translation Settings

Use the Google Translation Settings to display localized store suggestions.

module config translation

The extension detects the visitor’s country automatically.

  • Enable Google Translation: Enable automatic translation prompts for international visitors.
  • Prompt Display Type: Select how the translation prompt appears on the storefront.
  • Popup Message: Add the message displayed in the translation popup.
  • Switch Button Label: Enter the text for the store switch button.
  • Stay Button Label: Enter the text for the button that keeps customers on the current store.
  • Show Only Once Per Session: Display the translation prompt only once during each customer session.
  • Enable Translation Popup for Countries: Select the countries where the translation popup should appear.

IP Geolocation Extension Management

From here the admin after configuring the extension will manage the IP Geolocation extension.

module-config-with-support-links

IP Geolocation Store View Details

Now the admin will navigate to the store redirect sub-menu to map the store views with countries.

magento2-geo-ip-store-view-details

The admin can view the list of all the website store views which are mapped accordingly with the specific countries.

With the help of an action option, the admin can easily delete a specific or multiple store redirects at a time.

Also by clicking on the “Add New” option, the admin can create a new mapping.

magento2-geoip-redirection-details
  • Now for adding or mapping a new store, the admin will firstly enable the status.
  • Enter the name of the redirect store.
  • Select the countries whom IPs’ will be enabled for store view.
  • Select the store view and click on the Save button.

Currency Details

After mapping the countries with store views, now the admin will map the currency with specific countries so that on visiting the store.

The customer can see their desired currency option for making payment.

The admin will navigate to the IP Geolocation > Currency sub-menu option. As shown below in the snapshot.

magento2-geoip-cureency-details

The admin can view the list of all the currency mapped accordingly with the specific countries.

From here, the admin can delete the added currencies as well as can add new one as per the desired store view.

For mapping a currency with multiple countries, the admin clicks on “Add New” button.

Magento 2 IP Geolocation Extension magento2-geoip-currency-details
  • The admin will firstly enable the status
  • Select the currency & finally select specific or multiple countries and save it
  • The customers of these countries can select the currency on the website while shopping.

Redirect

Here the admin restricts the customers based on their Country & state IP addresses’ to view the products, categories & URLs.

Magento 2 IP Geolocation Extension magento2-geoip-redirection

The admin can view all the created redirection on the basis of product, URL & categories type.

Admin can create a new redirection on either product, URL or category as per the selected countries by clicking on Add new button.

Magento 2 IP Geolocation Extension magento2-geoip-redirect
  • The admin from here can enable the status of redirect feature.
  • Selects the type i.e product, category or URL which must be restrict from the customer.
  • After that, select product or category or enter URL as per the type selected in the above field.
  • Enter the redirect URL where the customer reaches after trying to access the product, category or URL.
  • In addition, the admin selects the countries & its relevant states whom customers are restricted to access the types selected.

Blocked IPs’

Under this option, the admin can enter multiple IPs’, to block or blacklist customers

Magento 2 IP Geolocation Extension magento2-geoip-blocked-ips

The admin from here can view the list of blocked countries IPs & can also add the new one by clicking on the “Add New” button.

Magento 2 IP Geolocation Extension magento2-geoip-blocked-ip-details
  • The admin needs to enable the status of the feature.
  • Can enter multiple countries’ IP addresses to block.
  • Enter the redirect URL to which the customer gets redirected to when belongs to the entered Ip addresses’.

Country Language Mapping

The Country Language Mapping feature lets the admin assign a default language to each country.

When customers visit the store, the extension detects their country and suggests the mapped language. This helps provide a localized shopping experience for international visitors.

The admin can navigate to Geo IP > Country Language Mapping to manage language mappings.

The grid displays all available countries along with their assigned language.

Magento 2 IP Geolocation Extension country language mapping details

Each record includes the following information:

  • Country Code – Displays the ISO country code.
  • Country Name – Shows the country name.
  • Language Name – Displays the language mapped to the country.
  • Action – Click Edit to update the language mapping.

To change the language for a country:

Magento 2 IP Geolocation Extension edit language mapping
  1. Locate the required country in the grid.
  2. Click Edit.
  3. Select the preferred language.
  4. Save the configuration.

After the mapping is updated, the extension uses the configured language when displaying localized store suggestions to customers from that country.

Front-end Module Flow

The Magento 2 IP Geolocation Extension personalizes the storefront based on the customer’s IP address.

It recommends the appropriate store view, currency, and language to create a localized shopping experience.

Store Switcher Modal Popup

When a customer visits the storefront, the extension detects their location using their IP address.

A centered popup recommends switching to the mapped local store view.

Magento 2 IP Geolocation Extension user manually redirect

Store Switcher Sticky Header Banner

Instead of a popup, the recommendation can appear as a sticky banner at the top of the page.

Customers can switch to the suggested store view without interrupting their shopping journey.

Magento 2 IP Geolocation Extension second layout view

Automatic Store View Redirection

If automatic redirection is configured, customers are redirected to their mapped store view after their location is detected.

This helps visitors land on the most relevant storefront automatically

webkul-magento2-geoip-customer-end-popup-img-6

Store View and Currency Switching

The customer experience depends on the Store View Change and Currency Change settings configured by the admin.

When Store View and Currency Changes Are Allowed

Customers are redirected to their mapped store view based on their IP address.

They can also manually switch to another available store view and select a different currency if required.

Magento 2 IP Geolocation Extension landing page

For example, a customer from the United States is automatically redirected to the U.S. store.

The customer can later switch to the German store view if manual switching is enabled.

Magento 2 GeoIP Extension store view update

Now the customer selects the German store view and its relevant currency from the currency option.

When Store View and Currency Changes Are Restricted:

Customers can access only the store view assigned to their country.

They also see only the currency mapped to that store view.

For example, a customer from the United States can browse only the U.S. store using the configured U.S. currency.

Magento 2 GeoIP Extension frond end

Global IP Redirection

If a visitor’s country is not mapped to any store view, the extension redirects them to the configured fallback URL.

A redirect message can be displayed before the customer is redirected.

Magento 2 IP Geolocation Extension url redirection

Translation Modal Popup

When Google Translation is enabled, the extension can display a translation popup.

Customers can translate the storefront into their mapped local language with a single click.

Magento 2 IP Geolocation Extension model-pop-up

Translated Storefront

The image below shows the storefront after the customer switches to the suggested language.

The storefront content is displayed in the mapped language, helping customers navigate the store more easily.

after-translation in selected language

This provides a localized shopping experience without requiring customers to manually change the store language.

Translation Sticky Header Banner

Instead of a popup, the translation recommendation can appear as a sticky notification at the top of the page.

Customers can translate the storefront while continuing to browse.

Magento 2 IP Geolocation Extension sticky popup view

Header Language Selector

Customers can manually change the storefront language using the language selector in the header.

This option is available when multiple storefront languages are configured.

Magento 2 IP Geolocation Extension manually language selection

Get in touch

Still, have any issues please feel free to add a ticket and let us know your views to make the extension better http://webkul.uvdesk.com/.

Explore the Adobe Commerce Cloud development services by Webkul. You may also browse other Magento 2 marketplace addons. Also our quality Magento 2 extensions.

Current Product Version - 4.0.7

Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home

User Guide of Magento 2 IP Geolocation Extension