- Print
- DarkLight
- PDF
How do I verify if my Prerender integration is working correctly?
How to Verify Prerender.io Integration
This guide will help you check if Prerender.io is working correctly on your site. While the used fuctions are available in other browsers as well we recommend using Google Chrome for this process.
Step-by-Step Verification Process
Open your website: Navigate to the URL you want to test.
Access Developer Tools:
- Windows: Press
Ctrl + Shift + J
- Mac: Press
Option + ⌘ + J
- Windows: Press
Show Network Conditions:
- Windows: Press
Ctrl + Shift + P
- Mac: Press
Command + Shift + P
- Type "Show Network Conditions" and select it
- Windows: Press
- Modify User Agent:
- In the Network Conditions tab, find "User Agent"
- Uncheck "Use browser default"
- Select "Googlebot" from the dropdown list
(Note: If you've modified the allow list in your Prerender config, choose a bot that's allowed)
Reload your site
Check for Prerender header:
- Switch to the Network tab
- Look at the first connection's headers
- If you see "x-prerender-requestid" in the response, Prerender.io is working correctly
Bot Validation Scenario
If your website uses bot validation, the above method might not work as it may block requests from non-authentic bot IP addresses. In this case:
- Add a custom user agent to your Prerender integration or select one that isn't strictly validated
- Follow the above steps, but instead of selecting Googlebot, use your custom user agent
- Optionally, you can add your preferred SEO tool's crawler user agent to your integration
For more details on adding bots, refer to this guide.
Common Issues and Solutions
Empty HTML Response
If you're only getting:
<html><head></head><body></body></html>
This typically occurs with frameworks using blocking I/O (e.g., Rails). Switch to a server that supports multiple processes or non-blocking I/O (like Unicorn or Puma) to avoid deadlocks when Prerender renders your page.
JavaScript Still Visible
If you're still seeing JavaScript instead of static HTML, your Prerender middleware might not be executing early enough. Try moving your Prerender middleware configuration higher in your code to ensure it runs first.
Partial Page Rendering
If your page is only partially rendered, you can use the window.prerenderReady
flag to control when Prerender saves the HTML:
- Add this to your HTML:
<script>window.prerenderReady = false;</script>
- Set it to true when your page is ready
(for example after an AJAX call):
window.prerenderReady = true;
This ensures Prerender waits until your page is fully loaded before saving the HTML.