N
Nuxt3mo ago
Strift

Vercel ISR: page redirects to `page-isr` when using isr: true

I have the following route rule configured:
routeRules: {
'/schedule': {
isr: 60 * 5,
}
},
routeRules: {
'/schedule': {
isr: 60 * 5,
}
},
✅ working When navigating to /schedule from the client side (clicking a link), I can access the page. On first hit, the page is generated, and on subsequent hits, Vercel serves from the cache. 🚨 not working However, when navigating to the URL directly (typing in my browser), the server fails to load the page and redirects me /schedule-isr, which 404s. Here are the headers I get from a curl call:
Headers
curl -I https://nextmatch.lol/schedule
HTTP/2 404
age: 2169
cache-control: no-cache
content-type: text/html;charset=utf-8
date: Thu, 25 Sep 2025 06:52:24 GMT
referrer-policy: no-referrer
server: Vercel
strict-transport-security: max-age=63072000
x-content-type-options: nosniff
x-frame-options: DENY
x-powered-by: Nuxt
x-robots-tag: index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1
x-vercel-cache: HIT
x-vercel-id: hkg1::iad1::rcg8w-1758785314013-2e628da9be5e
content-length: 10529
Headers
curl -I https://nextmatch.lol/schedule
HTTP/2 404
age: 2169
cache-control: no-cache
content-type: text/html;charset=utf-8
date: Thu, 25 Sep 2025 06:52:24 GMT
referrer-policy: no-referrer
server: Vercel
strict-transport-security: max-age=63072000
x-content-type-options: nosniff
x-frame-options: DENY
x-powered-by: Nuxt
x-robots-tag: index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1
x-vercel-cache: HIT
x-vercel-id: hkg1::iad1::rcg8w-1758785314013-2e628da9be5e
content-length: 10529
3 Replies
kapa.ai
kapa.ai3mo ago
Hi @Strift. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information in the knowledge sources, your route rule for ISR (Incremental Static Regeneration) on Vercel is correctly configured:
routeRules: {
'/schedule': {
isr: 60 * 5,
}
}
routeRules: {
'/schedule': {
isr: 60 * 5,
}
}
This should cause Nuxt (via Nitro) to cache the /schedule page on the CDN for 5 minutes, regenerating it in the background when stale. When navigating client-side, this works as expected. However, you are experiencing a 404 and a redirect to /schedule-isr when directly accessing the URL. The response headers indicate a 404 from Vercel, with x-vercel-cache: HIT, meaning Vercel is serving a cached 404 page. Possible Causes (Based on Knowledge Sources) - ISR and Static Hosting: Hybrid rendering with ISR is supported on Vercel, and route rules like isr are automatically mapped to Vercel's native caching where possible. However, the documentation notes that hybrid rendering is not available when using nuxt generate (static export). Ensure you are deploying with SSR enabled, not as a static site, so that Nitro can handle ISR properly Hybrid Rendering. - First Request 404: If the first request to /schedule results in a 404, Vercel may cache this 404 response. This can happen if the page was not generated or available at the time of the first request, or if the build output did not include the route. Once cached, subsequent requests will continue to receive the 404 until the cache is invalidated. - Route Naming/Redirects: There is no mention in the official documentation of Nuxt or Nitro redirecting to a -isr suffixed route. This may be a custom behavior or a misconfiguration elsewhere. Double-check your route definitions and any custom middleware or redirects. Recommendations 1. Check Deployment Mode: Make sure you are not using nuxt generate for deployment. Use SSR mode so that Nitro can handle ISR and dynamic route generation Hybrid Rendering. 2. Clear Vercel Cache: If a 404 was cached, redeploy your site or clear the cache on Vercel to ensure the ISR route can be generated on the next request. 3. Review Route Rules and Middleware: Ensure there are no conflicting redirects or middleware that could be causing the /schedule-isr redirect. 4. Update Nitro: There was a recent issue with ISR cache not working, which was fixed in Nitro v2.12.6. Make sure you are using at least this version to avoid known bugs Github Issue: Isr cache not working. Summary - ISR works with SSR deployments on Vercel, not with static exports. - A cached 404 can persist if the first request failed. - No official Nuxt/Nitro feature redirects to /schedule-isr; this may be a custom or accidental behavior. - Update Nitro and clear Vercel cache, then redeploy. If after these steps the issue persists, please check for custom redirects or middleware in your project and ensure your deployment process matches the requirements for hybrid rendering and ISR on Vercel. For more details, see the official documentation on Hybrid Rendering and the related Nitro issue. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@199597672850522123> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Strift
StriftOP3mo ago
However, it works with /schedule/

Did you find this page helpful?