Edge CDN status codes and behavior
How to read Prerender.io's Edge CDN response headers and HTTP status codes to debug your integration and verify cache behavior.
TL;DR
Prerender.io's Edge CDN attaches two headers to every response—X-Prerender-Request-ID and X-Prerender-Mode—that tell you exactly how a request was handled and whether the page was served from cache or rendered fresh. When something goes wrong, HTTP status codes 401, 500, 502, and 400 each include hint messages that identify the specific cause. Understanding these signals lets you debug your integration faster and confirm your pages are being cached correctly.
Response headers
Every response from the Edge CDN includes headers that identify the request and describe how it was handled.
X-Prerender-Request-ID
A unique identifier attached to every request. It is used to trace logs or debug issues. Provide this to support@prerender.io so the team can locate the exact request in the logs.
X-Prerender-Mode
Indicates how the response was served. Two possible values:
| Value | Meaning |
|---|---|
CacheHit |
A cached version of the page exists and was served immediately. |
CacheMiss |
No cached version exists. The request was passed through for live rendering. |
Cache mode headers
The headers attached to a response differ depending on whether the response is a cache hit or a pass-through.
Pass-through headers (CacheMiss)
When X-Prerender-Mode: CacheMiss, the following headers are applied:
Cache-ControlPragmaExpires
These tell the AI crawler or search engine bot not to cache the current response, and set a short expiration window in the future (typically around 60 seconds). This window allows Prerender.io to render the page so the crawler can return and receive the fully rendered version.
Cache hit headers (CacheHit)
When X-Prerender-Mode: CacheHit, the following headers are attached:
Expires: the date when the cached content will be refreshed, calculated from your recache interval.Last-Modified: the date the page was last rendered.
These let AI crawlers and search engines know when your content was last rendered and when to expect a fresher version.
ℹ️ To control how frequently cached pages are refreshed, adjust your recache interval in your Prerender.io dashboard. Setting a realistic interval balances content freshness with rendering load.
HTTP 401 – Unauthorized
The request is not authenticated or your account does not have Edge CDN access enabled.
To authenticate, your integration must include this header in every request:
X-Prerender-Token: YOUR_TOKEN
Each 401 response includes a hint message that identifies the specific cause:
| Hint message | What it means |
|---|---|
Missing [X-Prerender-Token] header |
The X-Prerender-Token header was not included in the request. |
Invalid environment token |
The token format does not match the required pattern (/^[a-zA-Z0-9]{20}$/). |
Environment token is not registered. Please visit your dashboard and turn on the Edge option for your account. |
The token is valid in format, but your account does not have the Edge CDN option enabled. |
To resolve the third case, log in to your Prerender.io dashboard and enable the Edge CDN option for your account.
HTTP 500 – Internal server error
An uncommon error that indicates an irregularity in your environment configuration. Prerender.io needs to review your setup directly.
Hint messages you may see:
| Hint message | What it means |
|---|---|
Invalid configuration is detected, please notify our support team |
Your environment configuration has an issue that requires manual review. |
Could not fetch from the origin, please notify our support team |
Prerender.io could not reach your origin server. Your server may be blocking Prerender.io's requests, or the requested domain does not exist. |
⚠️ If you see an HTTP 500, open a support ticket at support@prerender.io and include your X-Prerender-Request-ID. This error requires the support team to verify your configuration directly.
HTTP 502 – Bad gateway
The request was forwarded to Prerender.io when it should not have been. This typically points to an integration that is not filtering requests correctly.
Hint messages you may see:
| Hint message | What it means |
|---|---|
Prerender loop detected, please verify your integration |
The User-Agent string contains the word Prerender. Your integration is forwarding Prerender.io's own rendering process back to the proxy, creating a loop. Review your forward rules to exclude requests where the User-Agent contains Prerender. |
%path% is not renderable |
Prerender.io received a request for a static resource (an image, script, or similar file) that should be served by your origin server, not by Prerender.io. Update your forward rules to pass only HTML page requests to Prerender.io. |
HTTP 400 – Bad request (handled internally)
An edge case where Prerender.io's own integration detected an issue and abandoned the request. These errors are logged internally. The 400 response may include a hint message to assist debugging, but this is not an error your integration needs to handle or recover from.
ℹ️ If you see an HTTP 400, note the hint message and your X-Prerender-Request-ID, and share both with support@prerender.io if the issue persists.
Quick reference: common integration issues
| Symptom | Most likely cause | Fix |
|---|---|---|
| HTTP 401 on every request | Missing or invalid X-Prerender-Token |
Add the header, verify token format, enable Edge CDN in your dashboard. |
| HTTP 502 loop detected | Integration forwarding Prerender.io's own requests | Add a User-Agent filter to exclude requests where User-Agent contains Prerender. |
| HTTP 502 not renderable | Static resources forwarded to Prerender.io | Update forward rules to pass only HTML requests. |
| HTTP 500 | Origin unreachable or invalid configuration | Contact support with your X-Prerender-Request-ID. |
| Pages not cached | X-Prerender-Mode always showing CacheMiss |
Check your recache interval and confirm your integration is sending the correct token. |
Related articles
- Prerender.io status codes explained
- Why is my CDN serving unrendered content to bots?
- How to Avoid 429 Error Codes with Prerender
-
Why am I seeing 403 or 404 errors after integrating Prerender?
💬 Still need help? If you're seeing unexpected status codes or headers from the Edge CDN, our support team can review your configuration and trace the request using your X-Prerender-Request-ID. ➡️ Contact us at support@prerender.io