Prerender for Sitecore JSS

Does Prerender work with Sitecore JSS?

Prerender works with Sitecore JSS public websites through a configurable CDN or reverse proxy serving the frontend. For separately hosted JSS applications, including XM Cloud deployments, this connection routes eligible crawler requests to Prerender’s service without changes to Sitecore’s content APIs.

Sitecore JSS and Prerender compatibility at a glance

| Your setup | Prerender compatibility |

| --- | ------ |

| Public JSS frontend behind a customer-controlled Cloudflare proxy | Prerender documents a Cloudflare Worker connection. Its applicability to your Sitecore deployment depends on host permission, domain configuration, public-route scope, and cache behavior. |

| Separately hosted JSS frontend using another CDN or reverse proxy | A potential connection point. Select the component’s documented connection and assess whether it can handle eligible public requests. |

| JSS frontend on a managed host such as Vercel or Netlify | Requires hosting-specific assessment. Control of application code does not establish control of the complete public request path. |

| JSS frontend already using SSR, static generation, or incremental regeneration | Check the returned HTML first. Additional rendering may be unnecessary if essential content is already present. |

| Deployment without permission to change public routing | Your hosting provider or implementation team must establish an available connection before proceeding. |

| Traditional Sitecore MVC pages | Server-rendered HTML may already meet crawler needs. Assess the actual response before recommending additional rendering. |

How Prerender supports ‘machine experience’

A Sitecore JSS page may return its main content in HTML while loading other elements through browser JavaScript. If important text, navigation, or metadata appears only after that JavaScript runs, a crawler that does not execute it can receive an incomplete page. This affects machine experience: what machines receive when they request your public content.

Prerender loads the public page in a browser, executes its JavaScript, and caches the resulting HTML. Your configured connection returns that rendered response to eligible crawlers, allowing them to read the content without executing JavaScript themselves. Website visitors continue through the normal frontend request path. Learn how Prerender renders and caches pages.

How to connect Prerender to Sitecore JSS

1. Choose the connection for your rendering application and hosting environment

Identify the component serving your public page URLs: a CDN, reverse proxy, web server, or application handler. Confirm that your team can configure and deploy changes there. Access to Sitecore content management or Experience Edge settings alone does not establish that access.

For a customer-controlled frontend domain that permits Cloudflare proxying, a Cloudflare Worker is one documented option. Confirm that:

  • The host accepts the proposed proxy arrangement, including the public hostname, origin routing, and TLS configuration.
  • Your team controls the domain’s Cloudflare proxy settings, Worker routes, and deployment.
  • Intended crawler requests reach the Worker before another component returns cached HTML.
  • Prerender can fetch the public page and its required resources.

For other environments, review Prerender’s server and CDN connection options.

Managed hosts require additional review. For example, Vercel discourages placing another reverse proxy in front of a project and specifies requirements when one is used. Review Vercel’s reverse-proxy guidance before choosing this arrangement for a Vercel-hosted JSS frontend.

2. Configure the researched connection

For an approved Cloudflare setup, follow the Cloudflare Workers installation guide.

| Setting | What to configure |

| --- | ------ |

| Domain proxy | Enable Cloudflare proxying for the public frontend hostname. DNS-only mode bypasses the Worker. |

| Worker source | Use the Worker script linked from the installation guide. |

| Worker route | Match the intended public frontend hostname and paths. Review existing Worker routes for conflicts. |

| Prerender token | Configure the PRERENDER_TOKEN environment variable. |

| Public-page scope | Review route handling and add deployment-specific exclusions for editing, preview, authenticated content, and non-page endpoints before activation. |

| Activation | Save the configuration and deploy the Worker. Use the guide’s fail-open setting. |

The connection forwards eligible public page URLs to Prerender’s service and returns its response. The rendering application continues to obtain Sitecore content through its existing delivery connections.

Disable Automatic Signed Exchanges for this Cloudflare arrangement, as described in Prerender’s CDN guidance.

3. Inspect and extend crawler coverage

Open the Worker serving your production hostname and inspect its active BOT_AGENTS array and matching logic. The published Worker source contains these matches:

| Crawler | Match to check in your deployed Worker |

| --- | ------ |

| Googlebot | googlebot |

| GPTBot | gptbot |

| ClaudeBot | claudebot |

| PerplexityBot | perplexitybot |

Check each entry individually. An older or customized deployment may differ from the published source.

Append missing matches while retaining the existing entries you need. Preserve the Worker’s X-Prerender bypass so Prerender’s own page-fetching requests continue to the frontend instead of looping back into its service. Retain appropriate static-resource exclusions.

Save and redeploy the Worker to activate changes. Follow the guidance on adding crawler user agents.

Also inspect earlier firewall rules, AI-crawler controls, bot protection, and caches. A matching Worker entry cannot help a request that is blocked, challenged, or answered before reaching it.

How to verify what crawlers receive

Request a representative published page using a crawler user agent included in your configuration:

curl -i -A "Googlebot" "https://www.example.com/en/products/example"

Replace the example with a public Sitecore JSS URL. This retrieves response headers and HTML using a simulated Googlebot request.

Check both routing and content:

  • Look for the x-prerender-request-id response header and the corresponding request in Prerender’s CDN Analytics.
  • Inspect the returned HTML for essential page text, headings, links, title, and metadata.
  • Confirm the expected hostname, language, site, and canonical URL.
  • Confirm the response contains the published public page, rather than a preview, login screen, security challenge, or error.
  • Check status codes and redirects, then test the final destination.

Follow Prerender’s verification guide.

Repeat the request separately with GPTBot, ClaudeBot, and PerplexityBot. Testing Googlebot alone does not establish coverage for those crawlers.

Test representative routes for every intended site and language, including after caches have warmed. Compare the result with the expected anonymous visitor content. A simulated user agent verifies that test request; it does not establish that a real crawler passes every IP-based or network security control.

Requirements and limitations

  • Assess the existing HTML. Sitecore JSS supports several rendering approaches. Next.js applications can use SSR, static generation, incremental regeneration, and hybrid rendering. Establish which essential content is missing before adding another rendering service. See Sitecore’s JSS Next.js rendering documentation.
  • Confirm hosting and configuration access. The platform name does not establish permission to change CDN routing, deploy a Worker, or add application handlers. A Node.js deployment does not automatically provide an Express middleware connection.
  • Keep editing and private content outside the public scope. Exclude editing hosts, preview routes, authenticated pages, and private endpoints. Review deployment-specific paths, query parameters, and cookies; static-file exclusions alone do not define this boundary.
  • Review personalization. Establish the intended anonymous public response. Do not assume cached HTML reproduces every visitor’s session, location, consent state, or personalized experience.
  • Preserve language and site context. Ensure hostname, path, and meaningful query parameters resolve to the correct published content. Avoid cache rules that merge distinct sites or languages.
  • Check cache order. A cache in front of the selected connection can answer crawler requests before Prerender handling runs. Review bypass or cache separation rules and content freshness. See Prerender’s CDN caching guidance.
  • Allow page rendering. Firewalls, bot challenges, access restrictions, or blocked dependencies can prevent Prerender from rendering the page. Consult Prerender’s troubleshooting guide.
  • Verify after publishing changes. Coordinate frontend generation or regeneration with Prerender cache refreshes, then inspect the resulting public HTML.

Get help with your Prerender and Sitecore JSS setup

Need help confirming compatibility or choosing a connection? Contact Prerender support. The team can assess the proposed connection, identify any required setup, and help verify what crawlers receive.

FAQs about Prerender and Sitecore JSS integration

Public Sitecore JSS deployments can use Prerender when a configurable CDN or reverse proxy can route eligible crawler requests to Prerender’s service and the frontend host permits the connection. Eligible deployments may include separately hosted Next.js, React, Angular, or Vue applications. Check the hosting, framework version, and returned HTML to confirm compatibility and whether additional rendering is needed.

Prerender connects at the CDN or reverse proxy serving the separately hosted Sitecore JSS rendering application. The CDN or proxy routes eligible public page requests to Prerender’s service. The frontend keeps its existing Sitecore content delivery connections, without adding Prerender to the Sitecore Layout Service or Experience Edge content APIs.

An XM Cloud site can connect to Prerender through its frontend CDN or reverse proxy when the host permits the connection and the team can configure crawler routing. Confirm domain handling, security rules, and cache order before deployment. Access to the XM Cloud authoring environment or editing host alone does not provide control over public website requests.

A Sitecore JSS Next.js application may not need Prerender if SSR or static generation already includes essential content in the HTML response. Test representative public URLs, including components that load content through browser JavaScript. Consider Prerender when the returned HTML is missing essential content that Prerender can render.

CDN caching can prevent Sitecore JSS crawler requests from reaching Prerender when the CDN serves cached HTML before the configured Prerender connection runs. Review the public request path and configure cache bypass or separate cache handling for eligible crawlers. Verify crawler responses with both a populated cache and a cache miss.

Verify Prerender across Sitecore languages and sites by requesting published URLs for each public hostname and language with every intended crawler user agent. Confirm Prerender handling, then inspect the returned HTML for the correct language, site content, headings, links, and metadata. Test localized routes and redirects, and check that cached responses preserve the correct site and language.

Get in contact with our expert team