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

How Does Prerender Work With CDNs Like Cloudflare, Fastly, or Akamai?

Ensure your SEO content is always available to search engine crawlers no matter what CDN you use.

Overview

Content Delivery Networks (CDNs) are widely used to improve user experience by improving loading times for global visitors regardless of their distance from your data center.

When your site is behind a CDN (such as Cloudflare, Fastly, or Akamai), it is usually the easiest way to integrate Prerender into your system. The best practice is to integrate Prerender into the CDN to avoid possible routing issues.

How It works

The integration must detect if a request is coming from a search bot and then forward the request to our service with the Prerender token as a header. We have integration guides with each one of the CDNs mentioned below.

Fastly Integration 

  • It involves two VCL snippets, one for detecting the bots and the other for forwarding the requests to Prerender.
  • Uses a custom cache key that includes the User-Agent so that bot and user caches are separated.

Please refer to our Fastly integration guide for more information and instructions.

CloudFlare Integration

  • It uses a CloudFlare worker with JavaScript syntax.
  • It requires CloudFlare to be setup as a proxy on the domain.
  • A record (or CNAME) for the specified domain must be in proxy mode (orange cloud enabled)
  • Automatic Signed Exchange (SXGs) in CloudFlare must be disabled to avoid displaying the cached version of your web pages to users who click on the page link on the search engine results.

Please refer to our CloudFlare integration guide for more information and instructions.

Akamai Integration

Note: This is a community-maintained solution. Contact Akamai rep for support if needed.

  • It detects crawlers based on the user-agent request header but using Akamai Bot Manager is recommended for more flexible and reliable bot detection.
  • Route bot requests to https://service.prerender.io/
  • Include x-prerender-token in the request.
  • Edge Caching is disabled for bots

Please refer to our Fastly integration guide for more information and instructions.


Note: It might take a minute or two for the settings to take effect with CDNs. 

Important:

Test if the Prerender integration works on based on this guide: Verify the integration

If you don't see the x-prerender-requestID in the response headers, then the integration is not working, which might be why the other URL is not cached. 

Get Support

If you're still encountering issues after implementing Prerender:

  • Review your implementation against our documentation
  • Contact our support team:

Related Articles