Title: Geolocation options
Last modified: July 29, 2018

---

# Geolocation options

 *  Resolved [caraid](https://wordpress.org/support/users/caraid/)
 * (@caraid)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/geolocation-options/)
 * My websites are on shared hosting, so no server access.
 * I wish to use a Geo-location plugin like “Custom Content by Country” to deliver
   different content to different users as follows;
 * Example 1: Different widget banner adds to different countries
 * Example 2: Some different in-line post content to different countries
 * I guess I could enable ESI and set those widgets containing banner adds to not
   be cached. Can I do anything similar with WordPress posts, creating an ESI block
   via HTML tags or similar or would I just have to exclude the posts URL?
 * Or is there another option ?

Viewing 1 replies (of 1 total)

 *  Plugin Support [LiteSpeed Lisa](https://wordpress.org/support/users/lclarke/)
 * (@lclarke)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/geolocation-options/#post-10540423)
 * Hi, [@caraid](https://wordpress.org/support/users/caraid/)
 * Do you know much about how the plugin works? If it uses a cookie to determine
   what the user sees, you can create a cache vary on that cookie.
 * In other words, you can cache a copy of each page for your visitors from England,
   and a different copy of each page for your visitors from Norway (for example).
   These would still be publicly-cached pages.
 * You’d need to add a line to your `.htaccess` like this, where “geo-cookie” is
   the name of the cookie used by the plugin:
    ` RewriteRule .* - [E="cache-vary:
   geo-cookie"]
 * We discussed a similar situation [in this post](https://wordpress.org/support/topic/not-caching-pages-for-specific-users/#post-10485187)
   recently. And [this wiki](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:developer_guide:cache-vary?s[]=cookie#how_to_instruct_the_server_to_use_a_custom_vary)
   goes into some detail about how it works.
 * If the plugin doesn’t use cookies, ESI is a possibility, but if the visitors 
   will see the same content repeatedly, it would be better to set them to private
   cache instead of no cache.
 * Hope this helps!

Viewing 1 replies (of 1 total)

The topic ‘Geolocation options’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [LiteSpeed Lisa](https://wordpress.org/support/users/lclarke/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/geolocation-options/#post-10540423)
 * Status: resolved