Locator Upgrade - LiteSpeed CMS Steps
Table of Contents
Store finder pages on LiteSpeed
Search engines and AI assistants often cannot see your store finder. When they visit the page, your stores are not on it yet: they only appear later, on the visitor's screen. So your stores can be missing from search results and from the answers AI assistants give.
After these steps, every store finder page arrives with its stores already on it, with names, addresses and opening hours. Search engines and AI assistants can find each of your stores and show it. Your visitors see the same store finder as before.
It takes four steps.
What you need
LiteSpeed Enterprise. OpenLiteSpeed, the free edition, cannot do this
Access to your server's configuration, or someone who has it. A .htaccess file is not enough. LiteSpeed reads Apache configuration, and the steps below use it. Hosting panels such as cPanel set this up already
Your render token, from Uberall
Your locator key: the data-key of the store finder snippet already on your page
<div id="store-finder-widget" data-key="YOUR_LOCATOR_KEY"></div>
Step 1: Connect your server to Uberall
Open your site's configuration, the file with your <VirtualHost>, and paste this inside the <VirtualHost> block. Replace YOUR_RENDER_TOKEN with your token:
SSLProxyEngine on
RequestHeader set x-uberall-render-token "YOUR_RENDER_TOKEN" "expr=%{REQUEST_URI} =~ m#^/api/locator-fragments/#"
RequestHeader set Accept-Encoding "" "expr=%{REQUEST_URI} =~ m#^/api/locator-fragments/#"
RequestHeader set Cookie "" "expr=%{REQUEST_URI} =~ m#^/api/locator-fragments/#"
RequestHeader set Authorization "" "expr=%{REQUEST_URI} =~ m#^/api/locator-fragments/#"
RequestHeader set Proxy-Authorization "" "expr=%{REQUEST_URI} =~ m#^/api/locator-fragments/#"
RequestHeader set Via "" "expr=%{REQUEST_URI} =~ m#^/api/locator-fragments/#"
RewriteEngine on
RewriteRule ^/api/locator-fragments/(.*)$ https://uberall.com/api/locator-fragments/$1 [P,L,E=Proxy-Host:uberall.com]
The token stays on your server. Visitors never see it. But unlike Apache, LiteSpeed also answers this address when someone opens it directly, and uses your token to do it. If you have a CDN or a firewall, block /api/locator-fragments/ there for visitors.
Step 2: Turn on includes for the store finder
In the same <VirtualHost>, paste this. Replace /var/www/site/store-locator with the folder that holds your store finder page:
<Directory /var/www/site/store-locator>
Options +Includes
AddOutputFilter INCLUDES .html
</Directory>
Step 3: Add two lines to the store finder page
Open the HTML of your store finder page and add the two include lines shown below. Replace YOUR_LOCATOR_KEY with your locator key.
<head>
<!-- ... your head stays as it is ... -->
<!--#include virtual="/api/locator-fragments/head?key=YOUR_LOCATOR_KEY&path=${REQUEST_URI}" -->
</head>
<body>
<!-- ... -->
<div id="store-finder-widget" data-key="YOUR_LOCATOR_KEY">
<!--#include virtual="/api/locator-fragments/body?key=YOUR_LOCATOR_KEY&path=${REQUEST_URI}" -->
</div>
<script src="https://locator.uberall.com/locator-assets/storeFinderWidget-v2.js"></script>
</body>
The first line goes just before </head>. The second goes inside the store finder's div. Keep path=${REQUEST_URI} at the end of each line.
If your snippet has data-language or data-widgetoriginurl
Add the same values to both include lines, before &path=:
| Your snippet has | Add to both lines |
data-language="de" |
&lang=de |
data-widgetoriginurl="https://www.example.com/store-locator" |
&widgetOriginUrl=https://www.example.com/store-locator |
With both, the first line reads:
<!--#include virtual="/api/locator-fragments/head?key=YOUR_LOCATOR_KEY&lang=de&widgetOriginUrl=https://www.example.com/store-locator&path=${REQUEST_URI}" -->
Without them, the store finder uses the language and address set up for it at Uberall.
Step 4: Restart and check
Restart LiteSpeed:
sudo /usr/local/lsws/bin/lswsctrl restart
Open your store finder in the browser, right click, and choose View page source. Search the source for __ubSfSsr. If you find it, it works.
If it does not work
| What you see | What to do |
| The page never finishes loading | The server runs OpenLiteSpeed. This needs LiteSpeed Enterprise |
The source still shows the <!--#include ... --> lines |
The folder in step 2 is not the one that holds the page, or the page does not end in .html
|
A store's page, such as /store-locator/l/berlin/..., says "Not Found" |
Your server does not send the store finder page for every address under it. Add the lines below |
| The page shows parts of itself twice | Your server sends every address to one page, the includes too. Add the line below before that rule |
__ubSfSsr is not in the source |
Check the token and the key, and step 3 if your snippet has a language or an address. Then contact Uberall |
To send the store finder page for every address under it, paste this in the <VirtualHost>, with your own folder and page:
RewriteEngine on
RewriteRule ^/store-locator/. /store-locator/index.html [PT,L]
If your server already sends every address to one page, as WordPress and most content management systems do, add this line just before the rule that does it:
RewriteCond %{REQUEST_URI} !^/api/locator-fragments/