Skip to content

Switch to Prebaked

Switch from another prerender service in 5 minutes

Prebaked speaks the same protocol as the open-source prerender middlewares (prerender-node, prerender_rails, the common nginx config). If your site already sends crawlers to a prerender service, you keep your middleware and change two values: the service URL and the token.

Before you start

  1. Sign up for Prebaked.
  2. Add your site's domain (e.g. www.<your-domain>) and verify it. Prebaked renders only verified domains; until then it answers 403.
  3. Copy your token. It is shown once; you can rotate it later.

Change the service URL and token

New values everywhere:

SettingNew value
Service URLhttps://service.prebaked.io/
Token header X-Prerender-Tokenyour Prebaked token

Use https://. Prebaked refuses plain http:// calls with 403 (the token would travel in clear text), and it never redirects them.

prerender-node (Express, Connect)

Change the two settings, wherever you set them now:

js
prerender
  .set('prerenderServiceUrl', 'https://service.prebaked.io/')
  .set('prerenderToken', process.env.PREBAKED_TOKEN);

or the environment variables the middleware reads:

sh
PRERENDER_SERVICE_URL=https://service.prebaked.io/
PRERENDER_TOKEN=<your token>

Recommended while you are there (details in Express (prerender-node)):

  • the afterRender hook, so crawlers get your normal page instead of an error when the prerender service fails;
  • prerender.addUserAgents(['OAI-SearchBot', 'ClaudeBot', 'Claude-User', 'meta-externalagent']): prerender-node 3.8.3 does not recognise these crawlers.

prerender_rails (Rails, Rack)

Change the prerender_service_url: and prerender_token: options of Rack::Prerender, or the environment variables:

sh
PRERENDER_SERVICE_URL=https://service.prebaked.io/
PRERENDER_TOKEN=<your token>

prerender_rails defaults to http://, so set the https:// URL explicitly.

nginx

In your current config, change the prerender host in the proxy_pass (or the variable that holds it) to service.prebaked.io, use https://, and put your Prebaked token in proxy_set_header X-Prerender-Token.

The usual nginx prerender config passes every service error to the crawler. nginx adds the fallback to your site on errors and timeouts, plus Prebaked's crawler list; consider replacing your block with it.

Cloudflare Worker, Netlify, Vercel or another edge script

If your current service gave you a worker or edge script, change its service URL and token the same way. Or replace it with Prebaked's version, which falls back to your site on errors and after 5 seconds:

Deploy and check

sh
curl -A "Googlebot" https://www.<your-domain>/        # rendered HTML from Prebaked
curl https://www.<your-domain>/                      # your normal page

The first crawler request appears in the Prebaked dashboard request log. The first request for each page renders it; later requests are served from the cache.

What stays the same

  • Request format: GET <service URL>/<full page URL> with the X-Prerender-Token header.
  • Status codes: the page's own status is returned (200, 301/302 with Location, 404, 410).
  • Meta tags: <meta name="prerender-status-code" content="404"> and <meta name="prerender-header" content="Location: ..."> work as before and stay in the returned HTML.
  • Loop guard: Prebaked's own page fetches carry X-Prerender: 1, which the middlewares already skip.

What is different

  • HTTPS only (see above).
  • _escaped_fragment_ URLs are not supported.
  • Wrong token: 401. Domain not verified: 403. With the recommended fallback setups crawlers get your normal page instead of these errors.
  • Prebaked answers within its own time limit: if a page is not ready, it returns your origin page (fetched without JavaScript, with its own status) and finishes rendering in the background for the next crawler.

Switching takes five minutes.

Keep your prerender middleware. Change the service URL and token. Done.

Start free trial