We have a Dutch (.nl) webshop with also an international storeview (.com), we also have a .be storeview.

If an user requests webshop.com/product1 the user will be redirected to shop.nl with a "server:nginx status:302" redirect.

Settings are as following;

  • Add Store Code to Urls: no
  • Auto-redirect to Base URL: yes (302)
  • Storeviews; default NL
  • sort order of all storeviews = 0.
  • Base (unsecure & secure) urls are all set to the proper domain

If I turn Auto-redirect to Base URL to "NO" and request webshop.com/product1 , it shows product1 on webshop.com/product1, however with the Dutch (NL) storeview & therefore the Dutch language. I would like to show the "EN" storeview (so the product in English language) on .com without adding a storeview parameter.

We don't have this problem in the Dutch storeview. If requested webshop.nl/product1 it will serve webshop.nl/product1 without any redirects.

nginx geoip_country_code is configured as well, however this should work properly.

which is mapped like this; `

map $geoip_country_code $runcode {
AL en;
AD en;
AT en;
BY en;
BE be;
BA en;
etc ......

NL nl;

` If I go to domain.com/robots.txt it does not get redirected to .nl. Also when I remove this configuration the same problem occurs. Thereby I'm browsing from Sweden (which is SE en)

1 Answer 1


Unfortunately, the default Magento functionality doesn't allow you to do that.

As an option, you can consider one of our extensions - Magento Store & Currency Auto Switcher:


It uses the same MaxMind technology, as the ngx_http_geoip_module extension, but can additionally handle the Redirects problem. Here are some features that will help you do what you need:

  • setting Store View - Country relation
  • Switching between different Store Views automatically (by the IP address) and manually (on the frontend)
  • Switching to the necessary Store by the browser language
  • Redirect from webshop.nl/product1.html на webshop.com/the-same-product-with-different-url.html,(the same thing is for categories as well)
  • specifying which User Agents should be redirected, and which should not
  • and more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.