Redirect by location

For a visitor from another country, the shop suggests the language or store for their country in a bar. It never redirects them on its own.

⏱ 5 minAdvancedUpdated 8 Oct 2026

When a visitor comes from a country covered by another store view, a bar appears at the top of the page, for example We think you are in Croatia. Would you like to switch? The Go to button takes them to the suggested store, and Stay on closes the bar. If you like, a list of all languages can be shown next to it.

The shop never redirects a visitor on its own. This way Google and customers who are travelling can always open any language version.

Before you start

  • a list of which countries each language or store view covers (for example Slovenian: Slovenia; Croatian: Croatia, Bosnia and Herzegovina).

1. Switch on the module

Stores › Configuration › Magelan › Location suggestion

  1. In the Settings section, set Enabled to Yes.

  2. Offer all store views set to Yes adds a list of all languages next to the suggestion.

  3. Leave Allow ?geo_test= parameter on No. This option is for testing only.

    The Settings section of the location suggestion
    1. Enabled - Yes.
    2. Offer all store views - a list of all languages.
    3. Allow ?geo_test= parameter - for testing only, No on a live shop.
  4. Click Save Config.

2. Countries per store view

  1. At the top left, under Scope:, choose a store view, for example the Slovenian one. The countries field only appears at store view level.

  2. Under Countries served by this store view, choose the countries (hold Ctrl to choose several).

    The Countries served by this store view field at store view level
    Countries served by this store view - the countries for this view.
  3. Click Save Config and repeat for each store view.

Select each country for one store view only. A visitor from a country selected for the current store view gets no suggestion in the bar.
If Allow ?geo_test= parameter is switched on, anyone can fake their country by adding ?geo_test=DE to the address. Keep it switched off in a live shop.

How the shop finds out the country

It reads the country from information sent by the server or by an intermediary such as Cloudflare, or from an IP address database if one is installed. If it cannot find out the country, it does not show the bar. Once a visitor closes the bar, it does not appear for them again for a year.

The bar shows the store view name. Give your store views names customers understand, for example Hrvatski, not hr_store. You can edit the name in Stores › All Stores.

Common problems

I cannot see the bar

From Slovenia you do not see it on the Slovenian store view, because you are already in the right store. You may also have closed it already. Try a private browser window on another language.

The bar does not show for anyone

The server may not be sending the country information, or no countries are assigned to any store view. Check the settings per store view and write to us.

Was this article helpful?

Related

We use cookies for the proper functioning of the site, visit analytics and showing ads tailored to your interests. Read more in our privacy policy. By clicking "Accept all" you agree to the use of all cookies.