Skip to content
  • There are no suggestions because the search field is empty.

How does Prerender.io work?

Prerender.io serves fully rendered pages to search engine crawlers to improve your SEO and page indexing performance.

How Prerender.io works:

 

  • When a crawler visits, Prerender needs to identify it. This is done by checking a special code crawlers carry (user agent string).
  • Prerender also checks if the crawler is looking for your main content (excluding things like images or code).
  • If it's a crawler after your content, Prerender fetches a special pre-rendered version of your page, ready for the crawler to quickly understand and index.

How Prerender Works with Your Tech

Prerender helps search engines see your content instantly, boosting your SEO. Integrating it involves letting Prerender know when a search engine crawler visits your site.

Two Integration Options:

The Prerender integration can be adapted to how you are delivering your pages' content.

The best practices for integrating Prerender are:

  1. CDN Integration : This is the best option if you already use a Content Delivery Network (CDN) in front of your server. It's fast to set up but might have less flexibility depending on your CDN provider.
  2. Backend Integration : This gives you more control over which requests get sent to Prerender. However, it involves some coding on your server.

Consider how much control you need and your comfort level with coding. Backend integration offers more control, while CDN is quicker to set up.

You can find more about integrations in our Available integrations page.

Direct User Access

This is how your system operates by default.
Requests are coming from your clients and you serve them. Prerender doesn't take part in the flow.

Direct User Access

First-Time Crawler Request

If a crawler requests a page, your backend identifies it as a crawler and sends a request to Prerender. The first time this happens, the page won't be in the cache, called a cache miss. In this case Prerender.io needs to fetch the page from you, render it, store it in the cache, and return it to you. This process may take several seconds.

First-Time Crawler Request

 
Ultimately, the Prerender integration issues the following curl command, if the request is coming from a crawler:

curl -H "X-Prerender-Token: <YOUR\_PRERENDER\_TOKEN>" https://service.prerender.io/https://www.example.com/

Repeated Crawler Request

From the next occasion on, the page will be in our cache and we will serve it from there.

Repeated Crawler Request

Content Update

Your content changes. To follow the changes, Prerender.io needs to periodically refresh it's cache. This is called recaching and you can set the maximum age of your pages in the cache (called cache freshness). In this case, the trigger of the render is a timer without external event.

Content Update(1)

Video Overview

Here's a quick video explainer of how the process works.

 

 

 

Prerender.io improves SEO by intercepting crawler requests and delivering clean, pre-rendered HTML versions of your pages. This helps ensure that search engines like Google and Bing can index your single-page applications (SPAs), JavaScript-heavy content, and dynamic routes accurately and efficiently.

By caching and serving pre-rendered pages only to bots, Prerender boosts crawlability and performance while minimizing overhead for human visitors.

Detailed Explanation / How It Works

When Crawlers Visit

  • Prerender checks the user agent string in each request to identify if it's a bot.
  • If it’s a search engine crawler and the content is intended for indexing (not images or JS files), the request is rerouted to Prerender.io.
  • Prerender then returns a pre-rendered HTML snapshot of the page.

How Prerender Works With Your Stack

Prerender must be integrated with your web server, CDN, or middleware so that it knows when to intercept crawler traffic. Once in place, Prerender ensures that bots are served fully rendered pages, enhancing their ability to read metadata, rich content, and structured data that would otherwise be missed.

Integration Options

There are two common ways to integrate Prerender:

  • CDN Integration: Ideal for users already behind a CDN like Cloudflare or Akamai. Quick to set up, minimal coding, but slightly less flexible.
  • Backend Integration: Offers more control over logic and request conditions. Ideal if you need fine-tuned control over how/when Prerender is triggered.

For setup details, refer to our Available Integrations page.

How the Request Flow Works

Direct User Access

When a human visits your site, your server sends the original content directly—Prerender is not involved in this flow.

Direct User Access

First-Time Crawler Request

When a crawler (such as Googlebot) visits your site for the first time:

  1. Your backend identifies the visitor as a crawler.
  2. The request is rerouted to Prerender for processing.
  3. Prerender fetches the page, renders it in a headless browser, caches the result, and sends it back to the crawler.

Example curl command used by the integration:

curl -H "X-Prerender-Token: <YOUR_PRERENDER_TOKEN>" https://service.prerender.io/https://www.example.com/

First-Time Crawler Request

Repeated Crawler Requests

After the first request is cached, Prerender serves future crawler requests for this URL directly from its cache—reducing load times and speeding up crawl cycles.

Repeated Crawler Request

Content Updates and Recaching

When content changes, the cached version may become outdated. To maintain freshness, Prerender allows:

  • Manual recache via dashboard
  • Scheduled recache (via TTL)
  • API calls to recache URLs automatically after deployments

These ensure bots view the most current version of your content.

Content Update(1)

Step-by-Step Usage (for Developers)

  1. Install the middleware or configure your CDN to detect crawler user agents.
  2. Forward qualifying requests to https://service.prerender.io/ with your unique token header.
  3. Prerender handles rendering and caching transparently.

Common Pitfalls / Tips

  • Token Required: Be sure your middleware includes the X-Prerender-Token header or requests will be denied (403 error).
  • Crawler Blocking: Make sure your server or firewall isn’t blocking Prerender or bot user agents.
  • Check for Cache Misses: Review render history to confirm whether a page is being served fresh, from cache, or failing to prerender.

Related Articles


Video Overview

Here’s a short video that visually explains how the Prerender flow works: