Utilize GeoIP Feature for Magento 2

In today’s world, awareness and open-mindedness have evolved communities to respect, entertain, and accept different ideologies and concepts of utilizing certain elements for living one’s life. And thus, the allowance of certain products and services is accepted and legal in certain countries.

While for other countries, those are restricted products. Thus, it becomes necessary for globally selling eCommerce merchandise to verify the locations by detecting the GeoIP location of the user and accordingly, show/hide the product automatically from the website & restrict placing orders for that particular product for the respected user only.

Magento 2 GeoIP:

Magento merchants deal with such dilemmas and scenarios where they have no advanced options to show/hide products based on customer/county groups. Thus, maybe welcoming legal conspiracies and haunt the reputation of the company, got no need to worry as the extension called Country Specific Products Magento 2 extension takes your burden away. The Magento 2 GeoIP product hide extension auto-detects the GEO location of the user & shows/hides products through the GeoIP database.

The smart GeoIP Magento 2 extension detects the original locations of the user using a proxy disguised and restricts the product from getting added to the cart. Along with this, user live location detection is also provided by Maxmind, Geoplugin, etc.

Why Need Magento 2 restrict product by country

Apparently, the above-mentioned concept has made the usage of cannabis/weed/marijuana legal in some countries around the globe for health and pleasure purposes.

Great countries like the Netherlands, Canada, Uruguay, South Africa, etc. have made it legal for 18+ years of age to have abounded amount and grow with the permission of the priors. Some Age verification laws that e-commerce stores should know to sell age-restricted products.

Thus, acceptance of cannabis in some countries make it easy and available for Tobacco industry merchants to sell it online, have eCommerce, and deliver it to the peoples ordering from the countries where the usage, cultivation, possession, and intake of cannabis isn’t a crime.

But, for the merchants having a globally selling eCommerce, it may drag the merchant into legal problems to sell restricted products to the listed countries. Apart from the legal terms, it creates a false reputation for the company to display wide categories of restricted products on the site and allow users to place the order. 

A significant portion of merchants in the Gaming industry experiences the same scenarios. Some games containing realistic excessive violence, sensual content, nudity, drugs, and graffiti are banned from developing, distributing, trading, and displaying video games in some countries. Recently, PUBG – Player Unknown’s Battlegrounds game, focusing on violence and shooting got restricted from India due to the increase in addictivity in the young generation.

There is a long list of games that have been completely banned or whose in-game content has been changed to be following the gaming guidance of Australia.

Among the restricted, some of the great names rise,

  • Saints Row IV,
  • The Witcher 2,
  • Syndicate,
  • NecroVisioN,
  • Dark Sector,
  • Silent Hill: Homecoming,
  • Hotline Miami 2: Wrong Number,
  • Postal, South Park: The Stick of Truth,
  • Marc Eckō’s Getting Up: Contents Under Pressure.

Apart from Tobacco and Gaming Industries, there are several other industries like the Health Products Industry which have to be keenly careful with the country’s restrictions before selling any products. Merchants have to be mindful of the user’s location before allowing them to view and order the restricted products.

Even if the user plays around, draws curtains on the real locations, and tries to buy illegal products for the country, the merchant will be equally responsible for not being cautious. A small blunder can pull the merchant into the webs of illegal terms.

Now, with the enhancement of technologies and knowledge of disguised location techniques, how does a merchant follow the legal rules and save oneself from the illegal webs?

How they can follow creating a good reputation of the site by not displaying the restricted products for specific countries so no users from the listed countries can see or set orders.


If the business expands across borders and sells specific products which are restricted in certain countries, then it would be suggested to restrict the display of those specific products to specific countries. 

It doesn’t give a good user experience as a customer to visit a store, browse the most desirable products and finally, when proceeding to buy, the customer gets an alert for the product not being available for the country! It gives a poor user experience. Because it’s unable to buy the product, then the product shouldn’t be shown in the Product Feed or on any pages of the website.

A Magento 2 GeoIP extension is a very simple, robust, and reliable solution for this. It uses the Geoplugin and MaxMind database to identify the country/state/city from where the customer is visiting your website from his IP address. If your website has some products which are restricted/banned/illegal in that region, then a country-specific app would not show those products to that customer. 

What does the Country Specific Products Magento 2 extension do?

To overcome this challenge we have come up with the solution as a “country-specific app”. Which uses GeoIP as a tool to provide location details of any IP address globally, by using the MaxMind database. 

As we already know that electronic devices like laptops, pc, and cell phones have unique IP addresses. So if we locate the IP address, we can easily know the geographic location (city, country) of the particular device across the globe. GeoIP/Geoip2 tool works around this idea. 

GeoIP is a tool for locating IP addresses. It is capable of pinpointing IP addresses’ Geographic location to a particular city, or state. For this, it uses the GeoIP database. However, it is not accurate as other methods of geo-locations like mobile or GPS

When a customer is visiting your website, the GeoIP tool will identify the location of that IP address, and hide/show products selected from the backend. 

Admin can restrict/allow from the backend itself by selecting countries/products and creating groups, where he wants to show/hide any specific products, and restrict customers from seeing those products.

Most Useful Features of the extension:

  • Compatible with standard Magento themes
  • IP address wishlist
  • Hide the product specifically on the home page or collection page

Installations steps:

For more details and how our extension could add more value to your store, we would be happy to assist you.