How to configure LiteSpeed cache to work with GeotargetingWP?

Litespeed generates page cache on your site, meaning that in order to use our plugin you should enable AJAX mode to avoid getting cached results in your browser.

If you are targeting just countries, there is an option to configure Litespeed and instruct it to create a different cached page based on countries. So for example for a page called /sample-page Litespeed will have multiple versions such as /sample-page.html-US and /sample-page.html-FR

Follow these steps to configure litespeed:

  1. Add the following rules to your .htacess file
                
                    GeoIPEnable On
                    RewriteEngine on
                    CacheLookup on
                    RewriteRule .* - [E=Cache-Vary:geot_rocket_country]
                
            
    This will instruct LiteSpeed to vary the cache files based on a cookie named geot_rocket_country
  2. Install and activate this custom plugin that will instruct geotargetingwp to create the needed cookies . If you are using wprocket and wprocket mode, the plugin is not needed

    LiteSpeed geot plugin

Check out our WordPress geolocation solutions
to find out everything you can do!

Start your free trial