How do I integrate Prerender.io with WordPress?
Three integration methods for WordPress — Cloudflare CDN, Apache, or Nginx — matched to your hosting access and technical setup.
TL;DR
You can connect Prerender.io to your WordPress site using Cloudflare CDN (easiest, no server access needed), Apache (requires .htaccess and module access), or Nginx PHP (requires config file access). All three methods route AI crawler and search engine traffic through Prerender.io without affecting your website visitors.
Not sure which method fits your stack? Ask Nexus, your AI integration assistant, inside your Prerender.io dashboard. Describe your hosting setup and Nexus will recommend the right path.
Which method is right for you?
| Method | Best for | What you need |
|---|---|---|
| Cloudflare CDN | Any WordPress site, especially on managed or shared hosting | A Cloudflare account with your domain |
| Apache | Self-hosted or VPS WordPress with Apache | Access to .htaccess and Apache modules |
| Nginx (PHP) | Self-hosted or VPS WordPress with Nginx | Access to Nginx config files |
Choose Cloudflare if your hosting provider does not allow direct access to server configuration files. Choose Apache or Nginx if you have full server access and want more control over the integration.
Method 1: Cloudflare CDN integration
Cloudflare is the quickest method to configure and requires no server access. The integration uses a Cloudflare Worker to intercept AI crawler and search engine requests and route them to Prerender.io. Your website visitors are unaffected.
This integration uses the ESM module Worker type in Cloudflare. When creating your Worker, select the module (HTTP handler) type, not the legacy service worker type.
For full setup instructions, see Cloudflare CDN integration.
Method 2: Apache backend integration
The Apache integration modifies your .htaccess and httpd.conf files to proxy bot traffic to Prerender.io. You need editing access to both files, and the following Apache modules must be enabled: mod_rewrite, mod_proxy, mod_proxy_http, mod_headers, and mod_ssl.
The SSLProxyEngine on directive is required in your VirtualHost configuration. On many shared hosting plans, this requires root privileges. If you cannot access your VirtualHost config, contact your hosting provider.
How you enable Apache modules depends on your hosting control panel. If you are unsure, ask your hosting provider to enable the required modules for you.
For the full configuration, see the Apache backend integration guide or view the source on GitHub.
If your .htaccess is inaccessible, required Apache modules cannot be enabled, or the SSLProxyEngine on directive is blocked, contact your hosting provider's support for assistance.
Method 3: Nginx PHP application (backend integration)
For WordPress on Nginx, use the PHP application integration. This modifies your Nginx configuration files to proxy AI crawler and search engine traffic through Prerender.io.
For example configurations and a step-by-step guide with video, see:
If your server access is limited, ask your hosting provider whether they can apply the required Nginx configuration changes on your behalf.
Verify your integration
After completing any of the three methods above, confirm Prerender.io is correctly intercepting AI crawler and search engine requests.
See Verify your Prerender.io integration for step-by-step verification instructions.
Your integration is working when the x-prerender-request-id response header appears on requests from bots, or when your Prerender.io dashboard shows cached pages for your domain.
Related articles
- Cloudflare CDN integration
- Apache backend integration
- Nginx PHP application guide
- Verify your Prerender.io integration
Still need help? If you're unsure which integration method suits your WordPress setup, or you run into issues during configuration, our support team can help. → Contact us at support@prerender.io