A reverse proxy lets you serve a Pages site from a path on your existing website, such as www.brand.com/locations.
This is useful when you want to keep your primary domain while hosting location pages, a locator, or other Yext site content under a subdirectory.
This documentation is intended for the team responsible for their brand's website infrastructure, such as IT, web platform, CDN, or hosting team. It explains the customer-side reverse-proxy configuration. A Yext user with Visual Editor access will also need to complete the in-product configuration described in this guide.
Before you begin
You will need:
- A published Pages for Marketer site.
- Access to configure your organization's reverse proxy, CDN, or web server.
- A public URL path where the Yext site will be served, such as
/locations. - The Yext-hosted domain for your site.
You can find the Yext-hosted domain in Visual Editor under Site Configuration → Basic Settings.
How the reverse proxy works
Your reverse proxy receives requests on your public domain and forwards them to the Yext-hosted domain.
For example, if your public site is served at www.brand.com/locations:
| Public request | Request forwarded to Yext |
|---|---|
https://www.brand.com/locations/va/123-main-st | https://[YEXT_HOSTED_DOMAIN]/va/123-main-st |
https://www.brand.com/locations/sitemap.xml | https://[YEXT_HOSTED_DOMAIN]/sitemap.xml |
The proxy must remove the public path prefix, such as /locations, before forwarding requests to Yext.
Set Up a Reverse Proxy
1. Configure your reverse proxy
Configure your reverse proxy to forward traffic from the public path to your Yext-hosted domain.
Your configuration must:
- Forward requests from your public path to the Yext-hosted domain.
- Remove the public path prefix before forwarding the request.
- Preserve the rest of the path and query parameters.
- Use HTTPS with SNI support when connecting to the Yext-hosted domain.
- Send the
Hostheader for the Yext-hosted domain. - Respect DNS TTLs for the Yext-hosted domain; do not configure IP pinning.
- Forward the visitor's IP address in the standard
X-Forwarded-Forheader. - Disable proxy-side caching for all Yext responses, including error responses.
Yext manages caching for the site. Adding another cache at the reverse-proxy layer can cause visitors to see stale content.
Forwarding X-Forwarded-For enables server-side geolocation features, such as determining an initial location for a locator experience.
2. Configure URL handling
Configure the proxy to remove trailing slashes from routed page URLs, except for the root of the proxied site.
For example:
- Redirect
www.brand.com/locations/search/?query=new+yorktowww.brand.com/locations/search?query=new+york. - Redirect
www.brand.com/locationstowww.brand.com/locations/.
This helps relative URLs, assets, and links resolve consistently.
3. Set the reverse proxy prefixes in Visual Editor
Create a staging environment for the site if one does not already exist. Then open Site Configuration → Basic Settings and edit Reverse Proxy Prefixes.
Enter both public prefixes:
- Production:
www.brand.com/locations - Staging:
staging.brand.com/locations
Do not include https:// or http://.
The production and staging prefixes:
- Must be different.
- Must use the same subpath, such as
/locations. - Must be configured with Production first; a Staging prefix cannot be saved without a Production prefix.
Save both values and wait for the reverse-proxy-prefix update to complete before testing.
4. Expose the sitemap
Yext automatically maintains a sitemap at:
https://[YEXT_HOSTED_DOMAIN]/sitemap.xml
Once the reverse proxy is configured, it will be available publicly at:
https://www.brand.com/locations/sitemap.xml
Add this public sitemap URL to your primary domain's robots.txt file or sitemap index so search engines can discover the proxied site.
Recommended staging workflow
Use a separate public staging hostname with the same path as production:
staging.brand.com/locations
Pages provides a fixed Yext-hosted staging domain for the site. This domain continues to represent the current staging environment when staging environments are promoted, deleted, or recreated. Configure the staging reverse proxy to use this fixed domain rather than an environment-specific preview URL.
For the initial setup:
- Create or use a staging environment for the Pages site.
- Identify the production Yext-hosted domain and the fixed Yext-hosted staging domain.
- Configure the staging reverse proxy to forward
staging.brand.com/locationsto the fixed Yext-hosted staging domain. - Prepare the production reverse proxy to forward
www.brand.com/locationsto the production Yext-hosted domain. Ensure this route is ready before saving the production prefix, even if the traffic cutover will happen later. - In Site Configuration → Basic Settings → Reverse Proxy Prefixes, set both the Production and Staging prefixes.
- Wait for the update to complete, then validate the site at
staging.brand.com/locations. - Promote the tested site changes to production.
- Activate the production route if necessary and validate
www.brand.com/locations.
For subsequent releases, continue testing through the same staging public URL. You do not need to update the staging reverse-proxy target when the staging environment changes; Pages keeps the fixed staging domain associated with the current staging environment.
Launch checklist
Before launching, confirm that:
- The public reverse-proxy URL loads the expected site.
- Deep links load correctly when opened directly.
- Navigation, images, styles, and other assets load successfully.
- Search and locator features work as expected.
- Redirects retain the public domain and path prefix.
sitemap.xmlis available from the public URL.- The proxy forwards the
X-Forwarded-Forheader. - The proxy does not cache Yext responses.
This guide applies to sites built in the Visual Editor. It does not require code changes, asset-path rewrites, AnalyticsProvider configuration, or authorization-session configuration that may be needed for custom React Pages implementations.