Is the GeoIP Redirect module compatible with Varnish?

Is the GeoIP Redirect module compatible with Varnish?

Starting from version 1.3.10, the GeoIP Redirect extension does work with Varnish cache, but requires a few changes in the web server configuration for that:

1. For nginx - add the following code in any place of the nginx.conf file:

set_real_ip_from <varnish-ip>;

2. For apache - add the following code in any place of the .htaccess file:

RemoteIPTrustedProxy <varnish-ip>;

Where <varnish-ip> is an IP address of the Varnish server.

You can contact a hosting provider to change the web server configuration or do it on your own. With an independent change, you need to have root access and restart the server after the changes are implemented.

Kindly note that our extension doesn't influence the performance of Varnish itself. The server configuration above ensures receiving the correct IP address of the customer and thus, redirecting them to the correct store (according to the extension settings). 
      • Related Articles

      • How does the GeoIP Redirect module work with Cloudflare?

        There is a known issue with using the GeoIP Redirect module with Cloudflare. It occurs due to the actual IP address of a customer being replaced by the proxy IP. To introduce compatibility between Cloudflare and the GeoIP Redirect module, follow the ...
      • What is the difference between GeoIP Redirect and Store Switcher?

        GeoIP Redirect and Store Switcher are the two names of the same Amasty extension, they deliver identical functionality. Several product pages have been created to reveal the functionality of the module from different angles.
      • Does WebP work with Varnish?

        WebP images are compatible with the Varnish cache. The compatibility was introduced to the module in version 2.1.2. Make sure that you have the latest version of the extension installed. To make WebP images load on the website, it is required to ...
      • The module works inconsistently when tested with VPN. What could be the reason?

        Sometimes, the GeoIP Redirect module might not show expected behavior during testing. This is due to the fact that certain VPN extensions don't work correctly for some countries. There are two available options for thorough testing: 1. IP addresses ...
      • How to redirect customers to external resources from a website?

        Before you proceed to configure the settings of the extensions, make sure that you have downloaded and imported the GeoIP Data. For that, please open Magento Admin Panel → Stores → Configuration → GeoIP Data → Configuration, click the Download and ...